diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 00:45:09 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-02 00:45:09 -0300 |
commit | 7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d (patch) | |
tree | 8f7319a922ff5124985f11e6908afdadbe32f8d1 /activesupport/lib/active_support/deprecation/behaviors.rb | |
parent | 8a1c3476a62005e3cb7cfe440da71b94fab8aa5b (diff) | |
download | rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.tar.gz rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.tar.bz2 rails-7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d.zip |
Do not check only for the Rails constant
This constant may be define for auxiliar gems like rails-html-sanitizer
and these methods call will fail.
Diffstat (limited to 'activesupport/lib/active_support/deprecation/behaviors.rb')
-rw-r--r-- | activesupport/lib/active_support/deprecation/behaviors.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation/behaviors.rb b/activesupport/lib/active_support/deprecation/behaviors.rb index 328b8c320a..9f9dca8453 100644 --- a/activesupport/lib/active_support/deprecation/behaviors.rb +++ b/activesupport/lib/active_support/deprecation/behaviors.rb @@ -20,7 +20,7 @@ module ActiveSupport log: ->(message, callstack) { logger = - if defined?(Rails) && Rails.logger + if defined?(Rails.logger) && Rails.logger Rails.logger else require 'active_support/logger' |