From: Jean-Philippe Lang Date: Tue, 7 Aug 2012 16:14:24 +0000 (+0000) Subject: Prevent "Overwriting existing method User.active" warning, scope is already defined... X-Git-Tag: 2.1.0~167 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=962134ab4f861de0a86ed86dcf01a5cffab0940c;p=redmine.git Prevent "Overwriting existing method User.active" warning, scope is already defined on the base class (#11545). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10160 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/user.rb b/app/models/user.rb index 5aac1d1fe..9350fb95c 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -52,8 +52,6 @@ class User < Principal has_one :api_token, :class_name => 'Token', :conditions => "action='api'" belongs_to :auth_source - # Active non-anonymous users scope - scope :active, :conditions => "#{User.table_name}.status = #{STATUS_ACTIVE}" scope :logged, :conditions => "#{User.table_name}.status <> #{STATUS_ANONYMOUS}" scope :status, lambda {|arg| arg.blank? ? {} : {:conditions => {:status => arg.to_i}} }