def seed_from_csv(migration_class, csv_file)
      migration_class.transaction do
        csv_file.each do |line_values|
          record = migration_class.new
          line_values.to_hash.keys.map{|attribute| record.send("#{attribute.strip}=",line_values[attribute].strip) rescue nil}
          record.save(:validate => false)
        end
      end
    end
def seed_from_csv(migration_class, csv_file)
      migration_class.transaction do
        csv_file.each do |line_values|
          record = migration_class.new
          line_values.to_hash.keys.map{|attribute| record.send("#{attribute.strip}=",line_values[attribute].strip) rescue nil}
          record.save(:validate => false)
        end
      end
    end
Receives the class reference and csv file and creates all thre records
 inside one transaction