aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRyan T. Hosford <tad.hosford@gmail.com>2016-02-08 23:21:16 -0600
committerRyan T. Hosford <tad.hosford@gmail.com>2016-02-09 08:01:29 -0600
commit91c13624be7106e12f52799ab535302878219120 (patch)
tree717b96e09a345ec109103133a4e50ac80824f01c /activerecord/lib/active_record
parent43e902a65fbdf81a09fa498e34568eb32c84fe52 (diff)
downloadrails-91c13624be7106e12f52799ab535302878219120.tar.gz
rails-91c13624be7106e12f52799ab535302878219120.tar.bz2
rails-91c13624be7106e12f52799ab535302878219120.zip
Addresses #23568
- Corrects an incorrect exception message when using accepts_nested_attributes_for - Removes rescue/reraise behavior introduced in #19077 - Adds has_many & has_one, nested_attributes test case specifying the message that should be conveyed with an exception raised because one of the nested attributes provided is unknown
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/attribute_assignment.rb8
1 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/attribute_assignment.rb b/activerecord/lib/active_record/attribute_assignment.rb
index a6d81c82b4..4c22be8235 100644
--- a/activerecord/lib/active_record/attribute_assignment.rb
+++ b/activerecord/lib/active_record/attribute_assignment.rb
@@ -29,14 +29,6 @@ module ActiveRecord
assign_multiparameter_attributes(multi_parameter_attributes) unless multi_parameter_attributes.empty?
end
- # 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
- raise UnknownAttributeError.new(self, k)
- end
-
# 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) }