Makes enumerations available through the REST API.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10664 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2012-10-17 17:29:27 +00:00
1 parent fcb22595d0
commit d62b90db73
8 files changed
+91 -8

No files matched your search

+1
View File
@@ -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)}