diff options
author | Laknath <blaknath@gmail.com> | 2012-07-01 10:14:13 +0530 |
---|---|---|
committer | Laknath <blaknath@gmail.com> | 2012-07-01 10:14:13 +0530 |
commit | 0149a6eef9ab9201db8b48efeea35c46125a84f0 (patch) | |
tree | a8b69f2e79e02ebc1de0572fca43fd7414a97fd5 /activemodel/lib/active_model | |
parent | 167a0b9e83222a4bd16240932a55c1fd7a72dc44 (diff) | |
download | rails-0149a6eef9ab9201db8b48efeea35c46125a84f0.tar.gz rails-0149a6eef9ab9201db8b48efeea35c46125a84f0.tar.bz2 rails-0149a6eef9ab9201db8b48efeea35c46125a84f0.zip |
Changed attr_accessible example to reflect grouped roles
Related to the request #5699 - https://github.com/rails/rails/pull/5699 and
not documented.
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/mass_assignment_security.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/mass_assignment_security.rb b/activemodel/lib/active_model/mass_assignment_security.rb index 8f2c0bf00a..e57fcf1610 100644 --- a/activemodel/lib/active_model/mass_assignment_security.rb +++ b/activemodel/lib/active_model/mass_assignment_security.rb @@ -141,8 +141,10 @@ module ActiveModel # # attr_accessor :name, :credit_rating # - # attr_accessible :name - # attr_accessible :name, :credit_rating, :as => :admin + # # Both admin and default user can change name of a customer + # attr_accessible :name, :as => [:admin, :default] + # # Only admin can change credit rating of a customer + # attr_accessible :credit_rating, :as => :admin # # def assign_attributes(values, options = {}) # sanitize_for_mass_assignment(values, options[:as]).each do |k, v| |