-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
Dynamic attribute name causes Rails/ReadWriteAttribute to fail #623
Labels
duplicate
This issue or pull request already exists
Comments
Luckily, the fix for this is underway, see #619 |
10 tasks
nvasilevski
added a commit
to nvasilevski/rubocop-rails
that referenced
this issue
Jan 11, 2022
…tr for ReadWriteAttribute
nvasilevski
added a commit
to nvasilevski/rubocop-rails
that referenced
this issue
Jan 12, 2022
…tr for ReadWriteAttribute
nvasilevski
added a commit
to nvasilevski/rubocop-rails
that referenced
this issue
Jan 12, 2022
…tr for ReadWriteAttribute
I will a bugfix release in a few days after merging #619. |
koic
added a commit
that referenced
this issue
Jan 12, 2022
[Fix #623] Skip method shadowing check if attr is not sym or str for ReadWriteAttribute
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a stress case that causes the Rails/ReadWriteAttribute cop to fail for both read_attribute and write_attribute infractions. I have a method that should either return a value if present or commit a new value to that field.
Expected behavior
Rubocop should not throw an error.
Actual behavior
It throws an error:
Steps to reproduce the problem
Enable the cop and run rubocop on the following code:
RuboCop version
The text was updated successfully, but these errors were encountered: