diff options
author | Norman Clarke <norman@njclarke.com> | 2012-04-18 14:44:32 -0300 |
---|---|---|
committer | Norman Clarke <norman@njclarke.com> | 2012-04-18 14:44:32 -0300 |
commit | d92166cb26efa2f0bd8e2adad1b8024beefbfd81 (patch) | |
tree | 1d73ff9d3e71ea3f07db9da755733b38e2000119 /activerecord/lib | |
parent | 89f99e81120e7ac608b71dad68bed2ace73b170e (diff) | |
download | rails-d92166cb26efa2f0bd8e2adad1b8024beefbfd81.tar.gz rails-d92166cb26efa2f0bd8e2adad1b8024beefbfd81.tar.bz2 rails-d92166cb26efa2f0bd8e2adad1b8024beefbfd81.zip |
Check for nil logger
Diffstat (limited to 'activerecord/lib')
-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 0edc3f1dcc..9c50baa647 100644 --- a/activerecord/lib/active_record/scoping/named.rb +++ b/activerecord/lib/active_record/scoping/named.rb @@ -191,7 +191,7 @@ module ActiveRecord protected def valid_scope_name?(name) - if respond_to?(name, true) + if logger && respond_to?(name, true) logger.warn "Creating scope :#{name}. " \ "Overwriting existing method #{self.name}.#{name}." end |