automate employer setup import from word and manual entry working
This commit is contained in:
@@ -6,11 +6,7 @@ class ArrayOfItemsType < ActiveModel::Type::Value
|
||||
Array.wrap(value).map do |item_data|
|
||||
# Assuming item_data is a hash, this creates an instance of the Item class.
|
||||
# You can modify this part to match your object's initializer.
|
||||
if item_data.is_a?(Hash)
|
||||
Item.new(item_data)
|
||||
else
|
||||
item_data # Return the item as-is if it's already an object
|
||||
end
|
||||
item_data # Return the item as-is if it's already an object
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,4 +16,4 @@ class ArrayOfItemsType < ActiveModel::Type::Value
|
||||
end
|
||||
end
|
||||
|
||||
ActiveModel::Type.register(:array_of_items, ArrayOfItemsType)
|
||||
# ActiveModel::Type.register(:array_of_items, ArrayOfItemsType)
|
||||
Reference in New Issue
Block a user