-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 warning: method redefined;
#29963
Conversation
r? @pixeltrix (@rails-bot has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Instead of removing the instance method can we override the class method that is exactly what |
de696e6
to
bd9bb5d
Compare
I tried. However, it seems that the method of |
If |
I just tried to define the class method and it seems to work and the warning is not there anymore. |
This fixes the following warning: ``` /tmp/d20170727-7039-kmdtb1/app/app/models/user.rb:5: warning: method redefined; discarding old model_name rails/activemodel/lib/active_model/naming.rb:222: warning: previous definition of model_name was here ```
bd9bb5d
to
65a1733
Compare
Thank you for the detailed explanation. I was misunderstanding. |
This fixes the following warning: