开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜