Merge pull request #1504 from ombulabs/check-defined-rails-env

Check if Rails.env is defined
This commit is contained in:
Rafael França 2017-07-07 15:06:13 -04:00 committed by GitHub
commit f98b158a60
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ See https://github.com/plataformatec/simple_form/pull/997 for more information.
# Cache SimpleForm inputs discovery.
mattr_accessor :cache_discovery
@@cache_discovery = defined?(Rails) && !Rails.env.development?
@@cache_discovery = defined?(Rails.env) && !Rails.env.development?
# Adds a class to each generated button, mostly for compatiblity.
mattr_accessor :button_class