Ruby 3.1 has a new shorthand for its hash syntax. So you can now do things like...
def create
@my_model = MyModel.new(value:)
# ...
end
def value
'value'
end
Unfortunately, for the above scenario I get the following linter warning remove unused methods (MyController#value) even though the method #value is being used.
Ruby 3.1 has a new shorthand for its hash syntax. So you can now do things like...
Unfortunately, for the above scenario I get the following linter warning
remove unused methods (MyController#value)
even though the method#value
is being used.