summaryrefslogtreecommitdiffstats
path: root/app/models/custom_field.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-08-15 09:15:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-08-15 09:15:13 +0000
commitf820ccce3b02416c3b8ab5744eb262684040045d (patch)
tree121e8233ee5fd54155182b978613e636b7c4e8e5 /app/models/custom_field.rb
parent9c8c1cdb542895c7dfc868d929dee6e3a579dd5a (diff)
downloadredmine-f820ccce3b02416c3b8ab5744eb262684040045d.tar.gz
redmine-f820ccce3b02416c3b8ab5744eb262684040045d.zip
Use same logic for finding user as a custom field (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14503 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/custom_field.rb')
-rw-r--r--app/models/custom_field.rb14
1 files changed, 1 insertions, 13 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb
index 7d44d1d0e..1b8033a0e 100644
--- a/app/models/custom_field.rb
+++ b/app/models/custom_field.rb
@@ -141,19 +141,7 @@ class CustomField < ActiveRecord::Base
end
def value_from_keyword(keyword, customized)
- possible_values_options = possible_values_options(customized)
- if possible_values_options.present?
- keyword = keyword.to_s
- if v = possible_values_options.detect {|text, id| keyword.casecmp(text) == 0}
- if v.is_a?(Array)
- v.last
- else
- v
- end
- end
- else
- keyword
- end
+ format.value_from_keyword(self, keyword, customized)
end
# Returns a ORDER BY clause that can used to sort customized