Skip to content
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

allow default dependent option on has_one #176

Closed
wants to merge 1 commit into from

Conversation

grosser
Copy link
Contributor

@grosser grosser commented Dec 17, 2019

fixes #147

@grosser
Copy link
Contributor Author

grosser commented Dec 17, 2019

@andyw8 this does not work ... I think rubocop does not know the difference between a option that was not passed and an option passed with nil :(

            has_one :foo, class_name: 'Foo'
       +    ^^^^^^^ Specify a `:dependent` option.

@silasb
Copy link

silasb commented Mar 13, 2020

Any movement on this? We have some code that we are fixing up and running into this as well.

@shaul75
Copy link

shaul75 commented Apr 6, 2020

what about the has_many option?

@grosser
Copy link
Contributor Author

grosser commented Apr 6, 2020

this PR needs a rebase/fixup ... and has_many needs the same

koic added a commit to koic/rubocop-rails that referenced this pull request Apr 27, 2021
…ndent`

Fixes rubocop#147.
Closes rubocop#176.

This PR fixes a false positive for `Rails/HasManyOrHasOneDependent`
when specifying defalt `dependent: nil` strategy.
koic added a commit to koic/rubocop-rails that referenced this pull request Apr 27, 2021
…ndent`

Fixes rubocop#147.
Closes rubocop#176.

This PR fixes a false positive for `Rails/HasManyOrHasOneDependent`
when specifying default `dependent: nil` strategy.
@koic koic closed this in #467 Apr 27, 2021
@koic
Copy link
Member

koic commented Apr 27, 2021

JFYI, I solved this issue with #176. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rails/HasManyOrHasOneDependent should accept dependent: nil
4 participants