Mercurial > hg > soundsoftware-site
comparison app/models/.svn/text-base/issue_status.rb.svn-base @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | cca12e1c1fd4 |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
23 before_destroy :delete_workflows | 23 before_destroy :delete_workflows |
24 | 24 |
25 validates_presence_of :name | 25 validates_presence_of :name |
26 validates_uniqueness_of :name | 26 validates_uniqueness_of :name |
27 validates_length_of :name, :maximum => 30 | 27 validates_length_of :name, :maximum => 30 |
28 validates_format_of :name, :with => /^[\w\s\'\-]*$/i | |
29 validates_inclusion_of :default_done_ratio, :in => 0..100, :allow_nil => true | 28 validates_inclusion_of :default_done_ratio, :in => 0..100, :allow_nil => true |
30 | 29 |
31 def after_save | 30 def after_save |
32 IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default? | 31 IssueStatus.update_all("is_default=#{connection.quoted_false}", ['id <> ?', id]) if self.is_default? |
33 end | 32 end |