diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-09-18 21:23:47 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-09-18 21:23:47 -0500 |
commit | 533c11417acd63aeb36b411b8ac0cfa5cb574ab6 (patch) | |
tree | 009c1f0fa0c25e9a0cfd43377eecec2ac87ab7b2 | |
parent | c9f339ef4a2609bd1b29ad967ab1f123cadb0758 (diff) | |
download | rails-533c11417acd63aeb36b411b8ac0cfa5cb574ab6.tar.gz rails-533c11417acd63aeb36b411b8ac0cfa5cb574ab6.tar.bz2 rails-533c11417acd63aeb36b411b8ac0cfa5cb574ab6.zip |
Update AR::Base.create and AR:Base#update_attributes docs to remove references to mass assignment options
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 6f38262b86..2eaad1d469 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -17,12 +17,6 @@ module ActiveRecord # # Create a single new object # User.create(:first_name => 'Jamie') # - # # Create a single new object using the :admin mass-assignment security role - # User.create({ :first_name => 'Jamie', :is_admin => true }, :as => :admin) - # - # # Create a single new object bypassing mass-assignment security - # User.create({ :first_name => 'Jamie', :is_admin => true }, :without_protection => true) - # # # Create an Array of new objects # User.create([{ :first_name => 'Jamie' }, { :first_name => 'Jeremy' }]) # @@ -183,11 +177,6 @@ module ActiveRecord # Updates the attributes of the model from the passed-in hash and saves the # record, all wrapped in a transaction. If the object is invalid, the saving # will fail and false will be returned. - # - # When updating model attributes, mass-assignment security protection is respected. - # If no +:as+ option is supplied then the +:default+ role will be used. - # If you want to bypass the forbidden attributes protection then you can do so using - # the +:without_protection+ option. def update_attributes(attributes) # The following transaction covers any possible database side-effects of the # attributes assignment. For example, setting the IDs of a child collection. |