Skip to content

Commit

Permalink
Reference the Rails module as ::Rails.
Browse files Browse the repository at this point in the history
Closes sassgh-241
  • Loading branch information
theaboutbox authored and nex3 committed Aug 28, 2010
1 parent edbe1f2 commit 1746cb1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/haml/util.rb
Expand Up @@ -269,8 +269,8 @@ def haml_warn(msg)
#
# @return [String, nil]
def rails_root
if defined?(Rails.root)
return Rails.root.to_s if Rails.root
if defined?(::Rails.root)
return ::Rails.root.to_s if ::Rails.root
raise "ERROR: Rails.root is nil!"
end
return RAILS_ROOT.to_s if defined?(RAILS_ROOT)
Expand All @@ -283,7 +283,7 @@ def rails_root
#
# @return [String, nil]
def rails_env
return Rails.env.to_s if defined?(Rails.root)
return ::Rails.env.to_s if defined?(::Rails.root)
return RAILS_ENV.to_s if defined?(RAILS_ENV)
return nil
end
Expand Down

0 comments on commit 1746cb1

Please sign in to comment.