aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation/behaviors.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-02 00:45:09 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-02 00:45:09 -0300
commit7c6861b0bc85077ed1f1dcb4a919de0f1b8d490d (patch)
tree8f7319a922ff5124985f11e6908afdadbe32f8d1 /activesupport/lib/active_support/deprecation/behaviors.rb
parent8a1c3476a62005e3cb7cfe440da71b94fab8aa5b (diff)
downloadrails-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.rb2
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'