diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-01 19:35:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-02-01 19:35:49 +0000 |
commit | 0154d7477b536387b7e50c441e6931027a596dd1 (patch) | |
tree | 4e86e8337ddc1a4c7f38c14c233b4da4b8540c1b /app/models/principal.rb | |
parent | 5dd08133ef397d4e63545ef95aa287b91e1b0ed2 (diff) | |
download | redmine-0154d7477b536387b7e50c441e6931027a596dd1.tar.gz redmine-0154d7477b536387b7e50c441e6931027a596dd1.zip |
Simplifies Principal.active scope (status defaults to 1 for groups).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8746 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/principal.rb')
-rw-r--r-- | app/models/principal.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/principal.rb b/app/models/principal.rb index 5acb1d45d..d7814f595 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 - named_scope :active, :conditions => "#{Principal.table_name}.type='Group' OR (#{Principal.table_name}.type='User' AND #{Principal.table_name}.status = 1)" + named_scope :active, :conditions => "#{Principal.table_name}.status = 1" named_scope :like, lambda {|q| s = "%#{q.to_s.strip.downcase}%" |