mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove unused splat args in _create_record
`_create_record` is passed `attribute_names` only. ``` % git grep -n '_create_record(attribute_names' lib/active_record/attribute_methods/dirty.rb:173: def _create_record(attribute_names = attribute_names_for_partial_writes) lib/active_record/counter_cache.rb:162: def _create_record(attribute_names = self.attribute_names) lib/active_record/locking/optimistic.rb:64: def _create_record(attribute_names = self.attribute_names) lib/active_record/persistence.rb:738: def _create_record(attribute_names = self.attribute_names) ```
This commit is contained in:
parent
2403199330
commit
9b56cbd98d
2 changed files with 2 additions and 3 deletions
|
@ -159,8 +159,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
private
|
||||
|
||||
def _create_record(*)
|
||||
def _create_record(attribute_names = self.attribute_names)
|
||||
id = super
|
||||
|
||||
each_counter_cached_associations do |association|
|
||||
|
|
|
@ -61,7 +61,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
private
|
||||
def _create_record(attribute_names = self.attribute_names, *)
|
||||
def _create_record(attribute_names = self.attribute_names)
|
||||
if locking_enabled?
|
||||
# We always want to persist the locking version, even if we don't detect
|
||||
# a change from the default, since the database might have no default
|
||||
|
|
Loading…
Reference in a new issue