mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixed that symbols can be used on attribute assignment, like page.emails.create(:subject => data.subject, :body => data.body)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
ef214ecc40
commit
2bfaa05595
2 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
*SVN*
|
||||
|
||||
* Fixed that symbols can be used on attribute assignment, like page.emails.create(:subject => data.subject, :body => data.body)
|
||||
|
||||
|
||||
*1.8.0* (7th March, 2005)
|
||||
|
||||
* Added ActiveRecord::Base.colorize_logging to control whether to use colors in logs or not (on by default)
|
||||
|
|
|
@ -1012,6 +1012,7 @@ module ActiveRecord #:nodoc:
|
|||
# attributes not included in that won't be allowed to be mass-assigned.
|
||||
def attributes=(attributes)
|
||||
return if attributes.nil?
|
||||
attributes.stringify_keys!
|
||||
|
||||
multi_parameter_attributes = []
|
||||
remove_attributes_protected_from_mass_assignment(attributes).each do |k, v|
|
||||
|
|
Loading…
Reference in a new issue