I have an array like this
a = [] a << B.new(:name => \"c\") a << B.new(:name => \"s\") a << B.new(:name => \"e\") a << B.new(:n
In case you're looking for more efficient solution than save each row in the loop please look my answer here Ruby on Rails - Import Data from a CSV file
I'm suggesting to use gem activerecord-import there.
activerecord-import