Method: SassC::Util#rails_env
- Defined in:
- lib/sassc/util.rb
#rails_env ⇒ String?
Returns the environment of the Rails application, if this is running in a Rails context. Returns ‘nil` if no such environment is defined.
157 158 159 160 161 |
# File 'lib/sassc/util.rb', line 157 def rails_env return ::Rails.env.to_s if defined?(::Rails.env) return RAILS_ENV.to_s if defined?(RAILS_ENV) nil end |