Skip to content
Browse files

Check for nil logger

  • Loading branch information...
1 parent 89f99e8 commit d92166cb26efa2f0bd8e2adad1b8024beefbfd81 @norman norman committed Apr 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/scoping/named.rb
View
2 activerecord/lib/active_record/scoping/named.rb
@@ -191,7 +191,7 @@ def scope(name, scope_options = {})
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

0 comments on commit d92166c

Please sign in to comment.
Something went wrong with that request. Please try again.