Loading...
I’m working on a project and we’ve started to run into these warnings:
active_record/base.rb:1748: warning: toplevel constant [Class] referenced by [Class]::[Class].
I’m not sure what’s causing them but it’s making my test output UGLY .
1 Answer
-
5.0/5.
1 ratingBest Answer (as chosen by question asker)
If I recall, this has to do with namespacing. If you have a namespaced model, try sticking the precursory colons to your class references to explicitly call the base:
Not sure if that is entirely clear as I wrote it, but I believe that might help.