mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix keyword arguments warnings
This commit is contained in:
parent
fd305732b8
commit
3796cd628f
3 changed files with 3 additions and 3 deletions
|
@ -783,7 +783,7 @@ module ActiveRecord
|
|||
options[:primary_key_column] = column_for(match[:target_table], match[:primary_key])
|
||||
end
|
||||
|
||||
MismatchedForeignKey.new(options)
|
||||
MismatchedForeignKey.new(**options)
|
||||
end
|
||||
|
||||
def version_string(full_version_string)
|
||||
|
|
|
@ -5,7 +5,7 @@ module ActiveRecord
|
|||
class AssociatedValidator < ActiveModel::EachValidator #:nodoc:
|
||||
def validate_each(record, attribute, value)
|
||||
if Array(value).reject { |r| valid_object?(r) }.any?
|
||||
record.errors.add(attribute, :invalid, options.merge(value: value))
|
||||
record.errors.add(attribute, :invalid, **options.merge(value: value))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1298,7 +1298,7 @@ class TestAutosaveAssociationOnAHasOneAssociation < ActiveRecord::TestCase
|
|||
|
||||
# Stub the save method of the @pirate.ship instance to raise an exception
|
||||
class << @pirate.ship
|
||||
def save(*args)
|
||||
def save(*, **)
|
||||
super
|
||||
raise "Oh noes!"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue