mirror of
https://github.com/redmine/redmine.git
synced 2025-11-08 06:15:59 +01:00
Order scopes cleanup.
git-svn-id: http://svn.redmine.org/redmine/trunk@13526 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -36,7 +36,7 @@ class Enumeration < ActiveRecord::Base
|
||||
validates_length_of :name, :maximum => 30
|
||||
|
||||
scope :shared, lambda { where(:project_id => nil) }
|
||||
scope :sorted, lambda { order("#{table_name}.position ASC") }
|
||||
scope :sorted, lambda { order(:position) }
|
||||
scope :active, lambda { where(:active => true) }
|
||||
scope :system, lambda { where(:project_id => nil) }
|
||||
scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}
|
||||
|
||||
Reference in New Issue
Block a user