Welcome to Working With Rails

 

Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
Uploading multiple images
6 Posts
Uploading multiple images

Does anyone has an idea how I can fix this problem?

Edit : problem was fixed, I had to add the :index => nil at the end of the description field

The edit view uses the form partial from the pastie. The edit.html.erb file looks like this

*

'form' %>

|

form partial

{:multipart => true} do |f| %>

<br />

<br />
 2 %>

<br />
'project_photo', :collection => @project.photos %>
'photo', :collection => @project.photos %>

'photo', :object => Photo.new end %>

*

I meant your projects/edit.html.erb file. :)

I'm sorry I forgot to add the url, here it is http://pastie.org/709034

Thanks

please paste the code in the edit view.

Hi,

I followed this tutorial (http://infrastacks.com/?p=57) to upload multiple images at one time. This part is working fine.

I'd like to add a description field for each new photo, that's done and working in the create action. If I want to edit a given album, I'm getting a

[code] Completed in 40ms (View: 27, DB: 5) | 200 OK [http://localhost/projects/9/edit] /!\ FAILSAFE /!\ Wed Nov 15 21:44:33 +0100 2009 Status: 500 Internal Server Error expected Hash (got Array) for param `photo_attributes’ [/code]

But there, I haven't changed photo_attributes. Can someone tell me what I need to change to get this working?

Thanks

6 Posts
Login to add your message