Fix Performance/StringIdentifierArgument
cop (#28399)
This commit is contained in:
parent
2bd8d343cf
commit
1820bad646
6 changed files with 21 additions and 21 deletions
|
@ -457,8 +457,8 @@ class Account < ApplicationRecord
|
|||
end
|
||||
|
||||
def inverse_alias(key, original_key)
|
||||
define_method("#{key}=") do |value|
|
||||
public_send("#{original_key}=", !ActiveModel::Type::Boolean.new.cast(value))
|
||||
define_method(:"#{key}=") do |value|
|
||||
public_send(:"#{original_key}=", !ActiveModel::Type::Boolean.new.cast(value))
|
||||
end
|
||||
|
||||
define_method(key) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue