diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-02-28 19:54:42 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-02-28 19:58:45 +0900 |
commit | 42a16a4d6514f28e05f1c22a5f9125d194d9c7cb (patch) | |
tree | a0a393447e00b679dd93fa4350e873d5d3fb395f /activemodel/lib | |
parent | 761122a6caf5030db8d791ed7d9ebf7afac529a2 (diff) | |
download | rails-42a16a4d6514f28e05f1c22a5f9125d194d9c7cb.tar.gz rails-42a16a4d6514f28e05f1c22a5f9125d194d9c7cb.tar.bz2 rails-42a16a4d6514f28e05f1c22a5f9125d194d9c7cb.zip |
Alias `assign_attributes` to `attributes=` for `AttributeAssignment`
There is no reason `attributes=` doesn't take `assign_attributes`.
Diffstat (limited to 'activemodel/lib')
-rw-r--r-- | activemodel/lib/active_model/attribute_assignment.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/attribute_assignment.rb b/activemodel/lib/active_model/attribute_assignment.rb index aa931119ff..217bf1ac01 100644 --- a/activemodel/lib/active_model/attribute_assignment.rb +++ b/activemodel/lib/active_model/attribute_assignment.rb @@ -35,6 +35,8 @@ module ActiveModel _assign_attributes(sanitize_for_mass_assignment(attributes)) end + alias attributes= assign_attributes + private def _assign_attributes(attributes) |