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

[Fix #1356] Enhance Rails/DuplicateAssociation to handle alias #1419

Conversation

ydakuka
Copy link
Contributor

@ydakuka ydakuka commented Jan 18, 2025

Fix #1356


  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.

@ydakuka ydakuka changed the title [Fix #1356] Enhance Rails/DuplicateAssociation to handle alias [Fix #1356] Enhance Rails/DuplicateAssociation to handle alias Jan 18, 2025
@ydakuka ydakuka force-pushed the fix/enhance-rails-duplicate-association-to-handle-alias branch 3 times, most recently from f533ea0 to af4b9f7 Compare January 20, 2025 11:08
@ydakuka ydakuka force-pushed the fix/enhance-rails-duplicate-association-to-handle-alias branch from af4b9f7 to 10829d3 Compare January 20, 2025 15:19
belongs_to :foo
belongs_to :bar
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although this change caught my attention, the later definition takes precedence, so let's proceed with this for now.

@koic koic merged commit d1443ca into rubocop:master Jan 20, 2025
16 checks passed
@ydakuka ydakuka deleted the fix/enhance-rails-duplicate-association-to-handle-alias branch January 20, 2025 16:40
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.

DuplicateAssociation is not (yet?) safe correctable.
2 participants