Skip to content

Commit

Permalink
Fixed that symbols can be used on attribute assignment, like page.ema…
Browse files Browse the repository at this point in the history
…ils.create(:subject => data.subject, :body => data.body)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@886 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Mar 10, 2005
1 parent ef214ec commit 2bfaa05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activerecord/CHANGELOG
@@ -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)
Expand Down
1 change: 1 addition & 0 deletions activerecord/lib/active_record/base.rb
Expand Up @@ -1012,6 +1012,7 @@ def []= (attr_name, value)
# 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|
Expand Down

0 comments on commit 2bfaa05

Please sign in to comment.