aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/attribute_assignment.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb
index 36ddbad826..356421476c 100644
--- a/activemodel/lib/active_model/attribute_assignment.rb
+++ b/activemodel/lib/active_model/attribute_assignment.rb
@@ -34,6 +34,7 @@ module ActiveModel
end
private
+
def _assign_attributes(attributes)
attributes.each do |k, v|
_assign_attribute(k, v)
@@ -41,10 +42,8 @@ module ActiveModel
end
def _assign_attribute(k, v)
- public_send("#{k}=", v)
- rescue NoMethodError
if respond_to?("#{k}=")
- raise
+ public_send("#{k}=", v)
else
raise UnknownAttributeError.new(self, k)
end