I have something like this:
def import_from_csv(csv_file)
Item.transaction do
FasterCSV.foreach(csv_file.path) do |row|
item = Item.new(:name => row[0], :units => row[1], :price =>
row[2])
item.save!
end
end #transaction
end
If I got a negative price I want to rollback all items saved.It’s
possible?