-
Notifications
You must be signed in to change notification settings - Fork 169
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
conflict of constant ::Rails #1
Comments
Sadly, there is no way to fix this without patching Haml or renaming Haml::Rails. Happily, nex3 has invited me to submit Haml::Rails as a patch to Haml itself, which should resolve that particular problem. |
how nice! |
Is it worth me fixing this in Haml, or is the integration going to happen quickly enough that it won't matter? |
Well, referring to the top-level Rails constant by ::Rails is always a good idea... Haml breaking if someone ever defines a Haml::Rails class seems not that great. I was planning on just adding that as part of my patch (which unfortunately looks like it's going to take until next week, sorry. Work deadlines snuck up on me.) |
Ops. Rails again breaks things :) What would be a temporary workaround? |
s/Rails/::Rails/g in haml/util.rb of haml gem. |
nex3/haml@1746cb1 |
Thanks a lot. |
Haml refers toplevel constant Rails without :: in haml/util.rb to define rails_root and rails_env.
Unfortunately haml-rails defines a constant named Haml::Rails and this causes an error:
haml-3.0.17/lib/haml/util.rb:273:in
rails_root': undefined method
root' for Haml::Rails:Module (NoMethodError)The text was updated successfully, but these errors were encountered: