Use lambda form in model scopes (#12499)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10949 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@ class User < Principal
|
||||
has_one :api_token, :class_name => 'Token', :conditions => "action='api'"
|
||||
belongs_to :auth_source
|
||||
|
||||
scope :logged, :conditions => "#{User.table_name}.status <> #{STATUS_ANONYMOUS}"
|
||||
scope :logged, lambda { { :conditions => "#{User.table_name}.status <> #{STATUS_ANONYMOUS}" } }
|
||||
scope :status, lambda {|arg| arg.blank? ? {} : {:conditions => {:status => arg.to_i}} }
|
||||
|
||||
acts_as_customizable
|
||||
|
||||
Reference in New Issue
Block a user