-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Delegate cop should ignore class delegation #1509
Comments
+1 |
+1, or is there a better practice than using class delegation? |
I've just stumbled over the same issue when I write the following code. If the code is wrong, please tell me how to fix it. Else, it might be a new bug, or this one should be reopened. def self.[](code)
indexed[code]
end
def self.indexed
all.index_by(&:code)
end My goal is to be able to write things like |
This is fixed on |
Are you sure? I've changed the definition in the Gemfile to use the Github repo and it still occurs. |
I'm sure we're no longer processing class methods, so I cannot imagine how this can still happen. |
We have code like this:
And we get a delegate violation:
Rails/Delegate: Use delegate to define delegations.
.The text was updated successfully, but these errors were encountered: