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

[Bugfix] Allow to use frozen scope for Rails/UniqueValidationWithoutIndex #315

Merged
merged 1 commit into from
Jul 31, 2020

Conversation

krim
Copy link
Contributor

@krim krim commented Jul 31, 2020

AST for a frozen object looks like:

=> s(:send,
  s(:array,
    s(:sym, :b_id),
    s(:sym, :c_id)), :freeze)

The type for that is send, so it fails to detect the correct type for a scope.

@krim krim changed the title Allow to use frozen scope for Rails/UniqueValidationWithoutIndex [Bugfix] Allow to use frozen scope for Rails/UniqueValidationWithoutIndex Jul 31, 2020
@koic
Copy link
Member

koic commented Jul 31, 2020

This looks good to me. Can you add the changelog entry?
https://github.com/rubocop-hq/rubocop-rails/blob/v2.7.1/CONTRIBUTING.md#changelog-entry-format

@krim
Copy link
Contributor Author

krim commented Jul 31, 2020

Yep, done

CHANGELOG.md Outdated Show resolved Hide resolved
@krim krim force-pushed the fix/UniqueValidationWithoutIndex branch from d577b5b to 850037c Compare July 31, 2020 12:45
@koic koic merged commit 5e7115d into rubocop:master Jul 31, 2020
@koic
Copy link
Member

koic commented Jul 31, 2020

Thanks!

@krim krim deleted the fix/UniqueValidationWithoutIndex branch July 31, 2020 16:01
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.

2 participants