Mercurial > hg > soundsoftware-site
comparison app/models/.svn/text-base/custom_field.rb.svn-base @ 120:cd2282d2aa55 cannam
Merge from the default branch. Note that this is not a valid SVN repository any more (use default, redmine-1.1 etc for SVN updates).
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:33:08 +0000 |
parents | 8661b858af72 |
children | cbce1fd3b1b7 |
comparison
equal
deleted
inserted
replaced
118:b859cc0c4fa1 | 120:cd2282d2aa55 |
---|---|
21 serialize :possible_values | 21 serialize :possible_values |
22 | 22 |
23 validates_presence_of :name, :field_format | 23 validates_presence_of :name, :field_format |
24 validates_uniqueness_of :name, :scope => :type | 24 validates_uniqueness_of :name, :scope => :type |
25 validates_length_of :name, :maximum => 30 | 25 validates_length_of :name, :maximum => 30 |
26 validates_format_of :name, :with => /^[\w\s\.\'\-]*$/i | |
27 validates_inclusion_of :field_format, :in => Redmine::CustomFieldFormat.available_formats | 26 validates_inclusion_of :field_format, :in => Redmine::CustomFieldFormat.available_formats |
28 | 27 |
29 def initialize(attributes = nil) | 28 def initialize(attributes = nil) |
30 super | 29 super |
31 self.possible_values ||= [] | 30 self.possible_values ||= [] |