You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my case (see below) the Rails/Presence cops does not correctly correct the case of a multiplication, which produces a Zeitwerk error.
Expected behavior
There should be a space between the parenthesis and the * or remove the parenthesis and add a space between the * and the float/integer.
Actual behavior
I have this error : C: [Correctable] Rails/Presence: Use variable.presence || price.to_f *(12.0) instead of if variable.present?
and when I execute rubocop -a, it corrects : annual_contribution.presence || month_price.to_f *(12.0)
it gives me this error when I run bin/rails zeitwerk:check :
syntax error, unexpected *, expecting end-of-input
87 class TestingClass
123 def test_function
❯ 124 variable.presence || price.to_f *(12.0)
125 end
135 end
rails aborted!
In my case (see below) the
Rails/Presence
cops does not correctly correct the case of a multiplication, which produces a Zeitwerk error.Expected behavior
There should be a space between the parenthesis and the * or remove the parenthesis and add a space between the * and the float/integer.
Actual behavior
I have this error :
C: [Correctable] Rails/Presence: Use variable.presence || price.to_f *(12.0) instead of if variable.present?
and when I execute
rubocop -a
, it corrects :annual_contribution.presence || month_price.to_f *(12.0)
it gives me this error when I run
bin/rails zeitwerk:check
:Steps to reproduce the problem
and run
rubocop -a
RuboCop version
The text was updated successfully, but these errors were encountered: