diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-09 10:50:42 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-07-09 10:50:42 +0000 |
commit | 2072669769d24248789366e6552231c1cac5695d (patch) | |
tree | 260536878a7abf3983fba7f7905e93b6113f99a2 /app/models/issue_status.rb | |
parent | 93c2b92a4b5b7003be3113b5d9baf2a0448402a8 (diff) | |
download | redmine-2072669769d24248789366e6552231c1cac5695d.tar.gz redmine-2072669769d24248789366e6552231c1cac5695d.zip |
Fixed: Setting issue attributes from mail should be case-insensitive (#8759).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6199 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue_status.rb')
-rw-r--r-- | app/models/issue_status.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/issue_status.rb b/app/models/issue_status.rb index 5527e2c9a..f2db4b570 100644 --- a/app/models/issue_status.rb +++ b/app/models/issue_status.rb @@ -26,6 +26,8 @@ class IssueStatus < ActiveRecord::Base validates_uniqueness_of :name validates_length_of :name, :maximum => 30 validates_inclusion_of :default_done_ratio, :in => 0..100, :allow_nil => true + + named_scope :named, lambda {|arg| { :conditions => ["LOWER(#{table_name}.name) = LOWER(?)", arg.to_s.strip]}} def after_save IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default? |