diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-11 18:09:54 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-08-11 18:09:54 +0000 |
commit | 1631019026089cb7dc49b50365274bb07ba44025 (patch) | |
tree | f2bc278b3427710bfce0f7d0f1104d0e41e1e4df /app/models/custom_field.rb | |
parent | 16509203398f17fafca33136375263aec64b2a0f (diff) | |
download | redmine-1631019026089cb7dc49b50365274bb07ba44025.tar.gz redmine-1631019026089cb7dc49b50365274bb07ba44025.zip |
Allow same name for custom fields on different object types.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1730 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r-- | app/models/custom_field.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 990adf9e2..7ad19437f 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -30,7 +30,7 @@ class CustomField < ActiveRecord::Base }.freeze validates_presence_of :name, :field_format - validates_uniqueness_of :name + validates_uniqueness_of :name, :scope => :type validates_length_of :name, :maximum => 30 validates_format_of :name, :with => /^[\w\s\'\-]*$/i validates_inclusion_of :field_format, :in => FIELD_FORMATS.keys |