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
Is your feature request related to a problem? Please describe.
I have a large legacy code base. When adopting rubocop-rails defaults, the Rails/HasManyOrHasOneDependent presents many offenses that require manual code updates. As this code base already uses the default dependent implicitly, it seems reasonable that RuboCop could auto-correct the code to continue using it by specifying the argument explicitly.
Is your feature request related to a problem? Please describe.
I have a large legacy code base. When adopting rubocop-rails defaults, the
Rails/HasManyOrHasOneDependent
presents many offenses that require manual code updates. As this code base already uses the defaultdependent
implicitly, it seems reasonable that RuboCop could auto-correct the code to continue using it by specifying the argument explicitly.The documentation for
has_many
/dependent
is at:https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many
Describe the solution you'd like
Given:
After running
rubocup -A
withRails/HasManyOrHasOneDependent
enabled:Describe alternatives you've considered
The text was updated successfully, but these errors were encountered: