diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-08-17 00:07:35 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-17 00:07:35 -0300 |
commit | 0549f9debfe27b804d8b35a7c67e3bf015ae1b89 (patch) | |
tree | 19e9b4928a83dd786eb2696e490b955a3329f368 /activerecord | |
parent | 7eec1ba60483e22fb1dfd69f821cbb7a48ef6ff9 (diff) | |
parent | ab5070ede10c4ad9332f342232ab4d12db2bc5b0 (diff) | |
download | rails-0549f9debfe27b804d8b35a7c67e3bf015ae1b89.tar.gz rails-0549f9debfe27b804d8b35a7c67e3bf015ae1b89.tar.bz2 rails-0549f9debfe27b804d8b35a7c67e3bf015ae1b89.zip |
Merge pull request #26037 from monmonmon/master
Check if the logger is not nil before using it
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/scoping/named.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/scoping/named.rb b/activerecord/lib/active_record/scoping/named.rb index 46ee3540bd..094c0e9c6f 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -174,7 +174,7 @@ module ActiveRecord protected def valid_scope_name?(name) - if respond_to?(name, true) + if respond_to?(name, true) && logger logger.warn "Creating scope :#{name}. " \ "Overwriting existing method #{self.name}.#{name}." end |