Code cleanup.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-07-04 17:55:46 +00:00
parent a8e5ba0007
commit 65b4515e1a
1 changed files with 1 additions and 6 deletions

View File

@ -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