summaryrefslogtreecommitdiffstats
path: root/app/models/principal.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-07 17:59:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-07 17:59:20 +0000
commit7222e4012db58c53d364e3b065e70338c094e878 (patch)
tree2d0a723b9d9030591967b9932587fb5987062ce0 /app/models/principal.rb
parent4896d5c7e83bb3cc7996c5ab09441c90e7cd9ce1 (diff)
downloadredmine-7222e4012db58c53d364e3b065e70338c094e878.tar.gz
redmine-7222e4012db58c53d364e3b065e70338c094e878.zip
Rewrites named scopes with ARel queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10950 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r--app/models/principal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb
index 044f256ad..f467f847f 100644
--- a/app/models/principal.rb
+++ b/app/models/principal.rb
@@ -24,7 +24,7 @@ class Principal < ActiveRecord::Base
has_many :issue_categories, :foreign_key => 'assigned_to_id', :dependent => :nullify
# Groups and active users
- scope :active, lambda { { :conditions => "#{Principal.table_name}.status = 1" } }
+ scope :active, lambda { where("#{Principal.table_name}.status = 1") }
scope :like, lambda {|q|
q = q.to_s