Notes posted by nidhinnambiar

RSS feed
May 25, 2016
0 thanks

Active Record Import

With activerecord-import, you’d just add your records to an array and call import:

records_to_import = pricing_data.map do |location, price|
  Inventory.new(location: location, price: price) 
end

Inventory.import records_to_import