Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9906 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a8e5ba0007
commit
65b4515e1a
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue