1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-02-22 19:42:29 +00:00

remove spaces inside {} of app/models/enumeration.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@20396 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2020-11-16 12:22:25 +00:00
parent fa0df9132b
commit 14943d8d55

View File

@ -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