diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-01 19:27:09 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-01 19:27:09 +0000 |
commit | 91e991e9517fdeecf7b495957e90af7536486547 (patch) | |
tree | 1827a862165e421651c767d9ff796deb09947f90 /app/models | |
parent | dac22ebb396248529da588664da8ea4046aa38d1 (diff) | |
download | redmine-91e991e9517fdeecf7b495957e90af7536486547.tar.gz redmine-91e991e9517fdeecf7b495957e90af7536486547.zip |
Limits the schemes that custom field URL patterns can use (#22925).
git-svn-id: http://svn.redmine.org/redmine/trunk@15435 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/custom_field.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 511299523..370ce7090 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -262,6 +262,14 @@ class CustomField < ActiveRecord::Base args.include?(field_format) end + def self.human_attribute_name(attribute_key_name, *args) + attr_name = attribute_key_name.to_s + if attr_name == 'url_pattern' + attr_name = "url" + end + super(attr_name, *args) + end + protected # Removes multiple values for the custom field after setting the multiple attribute to false |