diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-01-23 14:51:59 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-01-23 14:51:59 -0700 |
commit | a225d4bec51778d99ccba5f0d6700dd00d2474f4 (patch) | |
tree | a0129ea986f198c21f9693b0c0c4ed4810d54b2b /activemodel/lib | |
parent | 2606fb339797a99c50e531105fc92071cef3db01 (diff) | |
download | rails-a225d4bec51778d99ccba5f0d6700dd00d2474f4.tar.gz rails-a225d4bec51778d99ccba5f0d6700dd00d2474f4.tar.bz2 rails-a225d4bec51778d99ccba5f0d6700dd00d2474f4.zip |
✂️ and 💅 for #10776
Minor style changes across the board. Changed an alias to an explicit
method declaration, since the alias will not be documented otherwise.
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attribute_assignment.rb | 5 |
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 |