Skip to content

Commit 99ccb56

Browse files
authored
Revert "Migrate ActiveRecord::Normalization to Active Model"
1 parent 31953d2 commit 99ccb56

File tree

6 files changed

+158
-301
lines changed

6 files changed

+158
-301
lines changed

activemodel/CHANGELOG.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
* Backport `ActiveRecord::Normalization` to `ActiveModel::Attributes::Normalization`
2-
3-
```ruby
4-
class User
5-
include ActiveModel::Attributes
6-
include ActiveModel::Attributes::Normalization
7-
8-
attribute :email, :string
9-
10-
normalizes :email, with: -> email { email.strip.downcase }
11-
end
12-
13-
user = User.new
14-
user.email = " [email protected]\n"
15-
user.email # => "[email protected]"
16-
```
17-
18-
*Sean Doyle*
191

202
Please check [8-0-stable](https://github.com/rails/rails/blob/8-0-stable/activemodel/CHANGELOG.md) for previous changes.

activemodel/lib/active_model.rb

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ module ActiveModel
5656
autoload :Validations
5757
autoload :Validator
5858

59-
module Attributes
60-
extend ActiveSupport::Autoload
61-
62-
autoload :Normalization
63-
end
64-
6559
eager_autoload do
6660
autoload :Errors
6761
autoload :Error

activemodel/lib/active_model/attributes/normalization.rb

Lines changed: 0 additions & 156 deletions
This file was deleted.

activemodel/test/cases/attributes/normalization_test.rb

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)