summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 32b7d4499..eed359fea 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -82,8 +82,8 @@ class User < Principal
has_one :api_token, :class_name => 'Token', :conditions => "action='api'"
belongs_to :auth_source
- scope :logged, lambda { { :conditions => "#{User.table_name}.status <> #{STATUS_ANONYMOUS}" } }
- scope :status, lambda {|arg| arg.blank? ? {} : {:conditions => {:status => arg.to_i}} }
+ scope :logged, lambda { where("#{User.table_name}.status <> #{STATUS_ANONYMOUS}") }
+ scope :status, lambda {|arg| where(arg.blank? ? nil : {:status => arg.to_i}) }
acts_as_customizable