From e7023cb8f153a1b340c24c9b2525e8b27567ebdb Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 14 Aug 2016 05:05:34 +0900 Subject: Avoid to allow unused splat args for `t.timestamps` in `create_table` Unfortunately `t.timestamps` in `create_table` allows unused splat args. But the same one in `change_table` does not allow them. This commit fixes the inconsistent behavior. --- activerecord/lib/active_record/migration/compatibility.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activerecord/lib/active_record/migration/compatibility.rb') diff --git a/activerecord/lib/active_record/migration/compatibility.rb b/activerecord/lib/active_record/migration/compatibility.rb index a79251f908..04e538baa5 100644 --- a/activerecord/lib/active_record/migration/compatibility.rb +++ b/activerecord/lib/active_record/migration/compatibility.rb @@ -21,7 +21,7 @@ module ActiveRecord end alias :belongs_to :references - def timestamps(*, **options) + def timestamps(**options) options[:null] = true if options[:null].nil? super end @@ -59,7 +59,7 @@ module ActiveRecord end alias :add_belongs_to :add_reference - def add_timestamps(*, **options) + def add_timestamps(_, **options) options[:null] = true if options[:null].nil? super end -- cgit v1.2.3