Rails Paperclip未定义方法`image_files_path'

时间:2012-03-25 13:13:34

标签: ruby-on-rails ruby paperclip

我正在尝试通过Paperclip上传文件,但我收到了一个我不明白的错误:

undefined method `image_files_path'

邪恶的代码(第2行)是

<h1>File Upload</h1>
<% form_for(@imageFile,:html => { :multipart => true }) do |f| %>
  <%= f.error_messages %>
  <%= f.label 'Photo' %><br />
  <%= f.file_field :image %>
<% end %>

1 个答案:

答案 0 :(得分:2)

添加routes.rb

resources :image_files