From a225d4bec51778d99ccba5f0d6700dd00d2474f4 Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Fri, 23 Jan 2015 14:51:59 -0700 Subject: =?UTF-8?q?=E2=9C=82=EF=B8=8F=20and=20=F0=9F=92=85=20for=20#10776?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Minor style changes across the board. Changed an alias to an explicit method declaration, since the alias will not be documented otherwise. --- activemodel/lib/active_model/attribute_assignment.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'activemodel/lib') 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 -- cgit v1.2.3