diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-30 23:42:33 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-08-30 23:42:33 +0900 |
commit | 56ca81a9111d1a47349299e2b973160885bad767 (patch) | |
tree | 00e282e5af4809b4ab028dabd061a155e24159ef /activerecord/lib/active_record/persistence.rb | |
parent | a72ac3cfec9956ccf093d870705d3dc22ced090e (diff) | |
download | rails-56ca81a9111d1a47349299e2b973160885bad767.tar.gz rails-56ca81a9111d1a47349299e2b973160885bad767.tar.bz2 rails-56ca81a9111d1a47349299e2b973160885bad767.zip |
Remove `attributes_with_values_for_{create,update}` for internal use
`attributes_with_values_for_update` is no longer used since ae2d36c, and
`attributes_with_values_for_create` is internally used only one place.
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r-- | activerecord/lib/active_record/persistence.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index 05963e5546..215b59f182 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -738,9 +738,12 @@ module ActiveRecord # and returns its id. def _create_record(attribute_names = self.attribute_names) attribute_names &= self.class.column_names - attributes_values = attributes_with_values_for_create(attribute_names) + attribute_names = attributes_for_create(attribute_names) + + new_id = self.class._insert_record( + attributes_with_values(attribute_names) + ) - new_id = self.class._insert_record(attributes_values) self.id ||= new_id if self.class.primary_key @new_record = false |