aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-09-02 19:20:29 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-09-02 19:24:57 +0900
commit9b56cbd98dc422976cd59ec9644d670768efdfc2 (patch)
tree950b8f5a12b677c566f3a13e02fb1fa38d28c14e /activerecord
parent240319933003edfd5718df6b6ebf5872791df9c0 (diff)
downloadrails-9b56cbd98dc422976cd59ec9644d670768efdfc2.tar.gz
rails-9b56cbd98dc422976cd59ec9644d670768efdfc2.tar.bz2
rails-9b56cbd98dc422976cd59ec9644d670768efdfc2.zip
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) ```
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/counter_cache.rb3
-rw-r--r--activerecord/lib/active_record/locking/optimistic.rb2
2 files changed, 2 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/counter_cache.rb b/activerecord/lib/active_record/counter_cache.rb
index c7f0077a76..aad30b40ea 100644
--- a/activerecord/lib/active_record/counter_cache.rb
+++ b/activerecord/lib/active_record/counter_cache.rb
@@ -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|
diff --git a/activerecord/lib/active_record/locking/optimistic.rb b/activerecord/lib/active_record/locking/optimistic.rb
index 1030b2368b..4a3a31fc95 100644
--- a/activerecord/lib/active_record/locking/optimistic.rb
+++ b/activerecord/lib/active_record/locking/optimistic.rb
@@ -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