diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-04 17:55:46 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-04 17:55:46 +0000 |
commit | 65b4515e1aaceeb2c89d7d3d6389a8504415e2f0 (patch) | |
tree | ef0dad84d415cea7e35f5fbc0151126cddf6717e /app/models | |
parent | a8e5ba00077b78b02f0e1449d89d93c4a79c6850 (diff) | |
download | redmine-65b4515e1aaceeb2c89d7d3d6389a8504415e2f0.tar.gz redmine-65b4515e1aaceeb2c89d7d3d6389a8504415e2f0.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/custom_field.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/custom_field.rb b/app/models/custom_field.rb index 5d528cd6a..6a362cb25 100644 --- a/app/models/custom_field.rb +++ b/app/models/custom_field.rb @@ -30,11 +30,6 @@ class CustomField < ActiveRecord::Base validate :validate_custom_field before_validation :set_searchable - def initialize(attributes=nil, *args) - super - self.possible_values ||= [] - end - def set_searchable # make sure these fields are not searchable self.searchable = false if %w(int float date bool).include?(field_format) @@ -97,7 +92,7 @@ class CustomField < ActiveRecord::Base value.force_encoding('UTF-8') if value.respond_to?(:force_encoding) end end - values + values || [] end end |