summaryrefslogtreecommitdiffstats
path: root/app/models/enumeration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r--app/models/enumeration.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb
index d4564a036..d3454021f 100644
--- a/app/models/enumeration.rb
+++ b/app/models/enumeration.rb
@@ -36,6 +36,7 @@ class Enumeration < ActiveRecord::Base
validates_length_of :name, :maximum => 30
scope :shared, where(:project_id => nil)
+ scope :sorted, order("#{table_name}.position ASC")
scope :active, where(:active => true)
scope :named, lambda {|arg| where("LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip)}