Skip to content

Commit 176d9dd

Browse files
authored
fix environment detection in litesupport.rb after erb addition
1 parent 8d37336 commit 176d9dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/litestack/litesupport.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Error < StandardError; end
1515

1616
# Detect the Rack or Rails environment.
1717
def self.detect_environment
18-
if defined? Rails
18+
if defined?(Rails) && Rails.respond_to?(:env)
1919
Rails.env
2020
elsif ENV["RACK_ENV"]
2121
ENV["RACK_ENV"]

0 commit comments

Comments
 (0)