Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
defining a named_scope which overwrites an existing method is now all…
…owed we just log a warning. This was motivated by the fact that :open is defined on all classes as such the named_scope "open" can never be used, without hacking ActiveRecord with an "undef_method" [#4083 state:resolved] Signed-off-by: wycats <wycats@gmail.com>
- Loading branch information
1 parent
77a2a3d
commit b0967cc
Showing
2 changed files
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
b0967cc
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.
Thanks for committing this @wycats.
I spent a lot of energy arguing about this,
but then gave up.
I think it's the correct behaviour to have a warning.
Take care.
b0967cc
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.
+1 lets change it from warn to debug/trace, it is a correctm excpected behavoir. Just spend alf hour with my colleague because of this warning: we thought that we have to rewrite our code to get rid ov scope overriding ;)