Don't crash when used while middleware was not applied. #19

Merged
merged 1 commit into from Sep 6, 2013
Jump to file or symbol
Failed to load files and symbols.
+3 −1
Split
@@ -12,9 +12,11 @@ class Railtie < ::Rails::Railtie
end
module EasyAccess
+
def http_accept_language
- env.http_accept_language
+ @http_accept_language ||= env.respond_to?(:http_accept_language) ? env.http_accept_language : Parser.new("")
end
+
end
end