提交 1f2a4b37 编写于 作者: H Hongli Lai (Phusion 提交者: Jeremy Kemper

Prevent AssetTagHelper from crashing if RAILS_ROOT is not defined. Fixes...

Prevent AssetTagHelper from crashing if RAILS_ROOT is not defined. Fixes compatibility with Passenger. [#84 state:resolved]
Signed-off-by: NJeremy Kemper <jeremy@bitsweat.net>
上级 e2af713d
......@@ -28,7 +28,11 @@ def logger
end
def root
RAILS_ROOT
if defined?(RAILS_ROOT)
RAILS_ROOT
else
nil
end
end
def env
......@@ -40,7 +44,7 @@ def cache
end
def public_path
@@public_path ||= File.join(self.root, "public")
@@public_path ||= self.root ? File.join(self.root, "public") : "public"
end
def public_path=(path)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册