Thank you for the reply.
I've been struggling with this for some time.

Recently, I have this...

- controller -
def create_csv_projects
   @imports = Import.all
   @projects = Project.all

    @imports.each { |import|
      if @projects.create!(params)
        flash['notice'] = 'CSV projects have been successfully created 
in Projects Database.'
        redirect_to :controller => 'projects', :action => 'index'
      end
    }
end

Unfortunately, it not working.

John

Jillian Galloway wrote:
> I think you have to loop through the list saving one record each time, 
> but I
> could be wrong. If anyone's got a better way I'd love to know what it 
> is. :)
> 
> 
> 
> On Tue, Oct 27, 2009 at 2:37 PM, John Mcleod <

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to