From 65b4515e1aaceeb2c89d7d3d6389a8504415e2f0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 4 Jul 2012 17:55:46 +0000 Subject: [PATCH] Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/custom_field.rb | 7 +------ 1 file changed, 1 insertion(+), 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