lib/madvertise/ext/environment.rb in madvertise-ext-0.1.3 vs lib/madvertise/ext/environment.rb in madvertise-ext-0.2.0
- old
+ new
@@ -18,9 +18,11 @@
# Retreive the current environment mode.
#
# @return [String] The current environment mode.
def mode
ENV[@key] || 'development'
+ rescue
+ 'development'
end
# Retrieve the current environment mode and convert it to a symbol.
#
# @return [Symbol] The current environment mode.