diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-01-26 08:17:53 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2015-01-26 08:17:53 -0200 |
commit | 71003d63b6e217625450b0942a7afb8d7d1d14d9 (patch) | |
tree | ee4295e6bdeaf389aa1bea1c2dbefbfb5bc5f586 /activerecord | |
parent | c414fc60ac66ed7581645fb0541072882d5d5354 (diff) | |
download | rails-71003d63b6e217625450b0942a7afb8d7d1d14d9.tar.gz rails-71003d63b6e217625450b0942a7afb8d7d1d14d9.tar.bz2 rails-71003d63b6e217625450b0942a7afb8d7d1d14d9.zip |
Move method to private section
It's under private in Active Model as well.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/attribute_assignment.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb index e368fdfff9..fdc90df5b6 100644 --- a/activerecord/lib/active_record/attribute_assignment.rb +++ b/activerecord/lib/active_record/attribute_assignment.rb @@ -5,6 +5,13 @@ module ActiveRecord extend ActiveSupport::Concern include ActiveModel::AttributeAssignment + # Alias for `assign_attributes`. See +ActiveModel::AttributeAssignment+. + def attributes=(attributes) + assign_attributes(attributes) + end + + private + def _assign_attributes(attributes) # :nodoc: multi_parameter_attributes = {} nested_parameter_attributes = {} @@ -22,13 +29,6 @@ module ActiveRecord assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty? end - # Alias for `assign_attributes`. See +ActiveModel::AttributeAssignment+ - def attributes=(attributes) - assign_attributes(attributes) - end - - private - # Assign any deferred nested attributes after the base attributes have been set. def assign_nested_parameter_attributes(pairs) pairs.each { |k, v| _assign_attribute(k, v) } |