You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -81,7 +81,7 @@ you can just define a `class` to do that.
81
81
```ruby
82
82
classPost
83
83
attr_reader:title, :body
84
-
84
+
85
85
# Initializer, attribute writers, methods, etc.
86
86
end
87
87
```
@@ -92,7 +92,7 @@ But we're on Rails, compared to Active Record model, it's lacking:
92
92
- Validation
93
93
- Integrate with Rails, the most part is integrate with Strong parameter, form helpers and I18n
94
94
95
-
### ActiveModel::Base
95
+
### ActiveModel::Model
96
96
97
97
Since Rails 4, Active Record has extracted the Rails integration layer called Active Model, it defined essential interfaces that how controller and view helpers can interact with the model.
98
98
@@ -104,7 +104,7 @@ I recommend read it first, here I want to explain what features contains in `Act
104
104
moduleModel
105
105
# It's a Mixin
106
106
extendActiveSupport::Concern
107
-
107
+
108
108
# Provides `write_attribute`, `read_attribute` and `assign_attributes` methods as unify attribute accessor,
0 commit comments