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
…lidationOnBelongsTo`
Fixesrubocop#1105.
This PR fixes false positives for `Rails/RedundantPresenceValidationOnBelongsTo`
when using `validates` with `:if` or `:unless` options.
koic
added a commit
to koic/rubocop-rails
that referenced
this issue
Oct 5, 2023
…lidationOnBelongsTo`
Fixesrubocop#1105.
This PR fixes false positives for `Rails/RedundantPresenceValidationOnBelongsTo`
when using `validates` with `:if` or `:unless` options.
Rails/RedundantPresenceValidationOnBelongsTo changes the following:
to:
Dropping the condition on the presence check clearly has an effect on behaviour.
The doc indicates that the cop is marked unsafe because the error message changes, so this seems like a bug.
Specs:
The text was updated successfully, but these errors were encountered: