diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index b5ee7b811..a8b74b8f2 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -35,10 +35,10 @@ class Enumeration < ActiveRecord::Base validates_uniqueness_of :name, :scope => [:type, :project_id] validates_length_of :name, :maximum => 30 - scope :shared, lambda { where(:project_id => nil) } - scope :sorted, lambda { order(:position) } - scope :active, lambda { where(:active => true) } - scope :system, lambda { where(:project_id => nil) } + scope :shared, lambda {where(:project_id => nil)} + 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)} def self.default