FEATURE: vBulletin importer

This commit is contained in:
Régis Hanol
2014-08-18 13:04:08 +02:00
parent 625c3e2961
commit 66aaa9329e
4 changed files with 639 additions and 31 deletions

View File

@@ -1,6 +1,8 @@
module HasCustomFields
extend ActiveSupport::Concern
module Helpers
def self.append_field(target, key, value, types)
if target.has_key?(key)
target[key] = [target[key]] if !target[key].is_a? Array
@@ -48,7 +50,6 @@ module HasCustomFields
HasCustomFields::Helpers.append_field(target,key,value,@custom_field_types)
end
def self.register_custom_field_type(name, type)
@custom_field_types ||= {}
@custom_field_types[name] = type