Merge pull request #20131 from vngrs/missing_doc_about_assign_attribute
Add more detailed comment about _assign_attribute method [ci skip]
This commit is contained in:
commit
f91cbb068f
@ -29,7 +29,8 @@ def _assign_attributes(attributes) # :nodoc:
|
|||||||
assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
|
assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
|
||||||
end
|
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:
|
def _assign_attribute(k, v) # :nodoc:
|
||||||
super
|
super
|
||||||
rescue ActiveModel::UnknownAttributeError
|
rescue ActiveModel::UnknownAttributeError
|
||||||
|
Loading…
Reference in New Issue
Block a user