rails paperclip multi upload
has somebody from you followed this tutorial? link text
I 开发者_StackOverflow中文版really don´t now why, but I got following fault, when I went through the tutorial word by word:
@album[photo_attributes]‘ is not allowed as an instance variable name
somebody an idea why?
Edited The problem may be from the fact that the variable 'photo' may be nil.
Replace the
<% fields_for ... %>
...
<% end %>
block with
<%= photo.inspect.to_s %>
and see if this is the case.
Edited
Try a monkey patch: instead of photo, put Photo.new
<% fields_for 'album[photo_attributes][]', Photo.new do |u| %>
I had same sort of trouble, and I find this topic link text
I think it will solve your problem
精彩评论