aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-12 20:28:00 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-05-12 20:28:00 -0300
commitf91cbb068f7364eea9f902ff7851e498c5b66092 (patch)
treefb17a49d8d68eded256f74c21a520010872f9abe /activerecord/lib/active_record
parentcc293e9b286386bac8dd69e7983b3f1bf48f1951 (diff)
parent803294034cc89ccee8ad0ed4401b47b344d29afe (diff)
downloadrails-f91cbb068f7364eea9f902ff7851e498c5b66092.tar.gz
rails-f91cbb068f7364eea9f902ff7851e498c5b66092.tar.bz2
rails-f91cbb068f7364eea9f902ff7851e498c5b66092.zip
Merge pull request #20131 from vngrs/missing_doc_about_assign_attribute
Add more detailed comment about _assign_attribute method [ci skip]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_assignment.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb
index cc265e2af6..45fdcaa1cd 100644
--- a/activerecord/lib/active_record/attribute_assignment.rb
+++ b/activerecord/lib/active_record/attribute_assignment.rb
@@ -29,7 +29,8 @@ module ActiveRecord
assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
end
- # Re-raise with the ActiveRecord constant in case of an error
+ # Tries to assign given value to given attribute.
+ # In case of an error, re-raises with the ActiveRecord constant.
def _assign_attribute(k, v) # :nodoc:
super
rescue ActiveModel::UnknownAttributeError