diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-29 21:49:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-29 21:49:33 +0000 |
commit | 522bebe5edbe302ab3e51a64e163877c3ca5eab6 (patch) | |
tree | b130ef847cf1e3563bf4409b8d0e9c6d6781b93d /app/models/group.rb | |
parent | 47e74dc689811a1170db4df07ea64d1176ed5a52 (diff) | |
download | redmine-522bebe5edbe302ab3e51a64e163877c3ca5eab6.tar.gz redmine-522bebe5edbe302ab3e51a64e163877c3ca5eab6.zip |
Order scopes cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@13526 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/group.rb')
-rw-r--r-- | app/models/group.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/group.rb b/app/models/group.rb index a7a17edb8..12fa5f84b 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -32,7 +32,7 @@ class Group < Principal before_destroy :remove_references_before_destroy - scope :sorted, lambda { order("#{table_name}.type, #{table_name}.lastname ASC") } + scope :sorted, lambda { order(:type => :asc, :lastname => :desc) } scope :named, lambda {|arg| where("LOWER(#{table_name}.lastname) = LOWER(?)", arg.to_s.strip)} scope :givable, lambda {where(:type => 'Group')} |