diff options
author | Edward Tsech <edtsech@gmail.com> | 2012-05-25 16:34:34 +0200 |
---|---|---|
committer | Edward Tsech <edtsech@gmail.com> | 2012-05-25 16:35:53 +0200 |
commit | b98a343da5b9fd6a6ffa7eeac42c141f5b64e961 (patch) | |
tree | b1fedb41e2756af3efac7e752cde6b679d427498 /activemodel/lib/active_model | |
parent | cb25bce26f44806fca780cd8ddd3d18c3b999dc0 (diff) | |
download | rails-b98a343da5b9fd6a6ffa7eeac42c141f5b64e961.tar.gz rails-b98a343da5b9fd6a6ffa7eeac42c141f5b64e961.tar.bz2 rails-b98a343da5b9fd6a6ffa7eeac42c141f5b64e961.zip |
Add comment for attr_accessible/attr_protected :as option. [ci skip]
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/mass_assignment_security.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/mass_assignment_security.rb b/activemodel/lib/active_model/mass_assignment_security.rb index 893fbf92c3..cfce1542b1 100644 --- a/activemodel/lib/active_model/mass_assignment_security.rb +++ b/activemodel/lib/active_model/mass_assignment_security.rb @@ -62,7 +62,7 @@ module ActiveModel # Attributes named in this macro are protected from mass-assignment # whenever attributes are sanitized before assignment. A role for the # attributes is optional, if no role is provided then :default is used. - # A role can be defined by using the :as option. + # A role can be defined by using the :as option with a symbol or an array of symbols as the value. # # Mass-assignment to these attributes will simply be ignored, to assign # to them you can use direct writer methods. This is meant to protect @@ -128,7 +128,7 @@ module ActiveModel # # Like +attr_protected+, a role for the attributes is optional, # if no role is provided then :default is used. A role can be defined by - # using the :as option. + # using the :as option with a symbol or an array of symbols as the value. # # This is the opposite of the +attr_protected+ macro: Mass-assignment # will only set attributes in this list, to assign to the rest of |