-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails/HasManyOrHasOneDependent with paranoia gem #14
Comments
I also have this question. I think using a magic comment disable makes sense but I wish there was a better option. How better could RuboCop know to ignore this rule in this scenario? |
Currently RuboCop Rails does not have a configuration for option regarding combination with 3rd party gem. If you'd like to suppress the warn quickly , please make the following setting. # Specify `dependet: nil`.
has_many :articles, dependent: nil Further details: #467 or # Your .rubocop.yml
Rails/HasManyOrHasOneDependent:
Enabled: false Thank you. |
I bumped into this as well (similar scenario, not specific to the gem), but when I specify app/models/custom_quiz.rb:29:3: C: Rails/HasManyOrHasOneDependent: Specify a :dependent option.
has_many :training_sessions, :dependent => nil
^^^^^^^^ |
@gingerlime Is it happening in the latest RuboCop Rails 2.10? Can you provide the result of |
|
The gems need to be updated and RuboCop Rails 2.10 requires RuboCop 1.7 or higher. Please |
Strange, but when I run |
Moved from rubocop/rubocop#5285
Hi!
Do you have any suggestions how to use gems providing soft-delete (like paranoia) with HasManyOrHasOneDependent cop: I think it's usual to not provide
dependent
option tohas_many
when parent is soft-deletable. Is it supposed just to userubocop:disable
for offences in such cases?RuboCop version
The text was updated successfully, but these errors were encountered: