]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 4 Jul 2012 17:55:46 +0000 (17:55 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 4 Jul 2012 17:55:46 +0000 (17:55 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/custom_field.rb

index 5d528cd6a3b3a6fcabfa3e4db6fe781865257a20..6a362cb25a2ad4381bc38f6d8db11c5db17c960d 100644 (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