diff options
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/named_scope.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/named_scope.rb b/activerecord/lib/active_record/named_scope.rb index 11c21a9207..aac00cc54a 100644 --- a/activerecord/lib/active_record/named_scope.rb +++ b/activerecord/lib/active_record/named_scope.rb @@ -102,7 +102,8 @@ module ActiveRecord name = name.to_sym if !scopes[name] && respond_to?(name, true) - raise ArgumentError, "Cannot define scope :#{name} because #{self.name}.#{name} method already exists." + logger.warn "Creating scope :#{name}. " \ + "Overwriting existing method #{self.name}.#{name}." end scopes[name] = lambda do |parent_scope, *args| |