Ruby on rails 使用prawn创建的pdf的路由错误
我有一组图像,我选择一个图像并使用表单将其src传递给一个隐藏字段Ruby on rails 使用prawn创建的pdf的路由错误,ruby-on-rails,pdf,ruby-on-rails-4,routes,prawn,Ruby On Rails,Pdf,Ruby On Rails 4,Routes,Prawn,我有一组图像,我选择一个图像并使用表单将其src传递给一个隐藏字段 <%= form_for(:img, method: "post", url: {action: "printer"}) do |f| %> <input type="hidden" id="image_attach" name="image_attach"> <%= f.submit "Print" %> <%end%> 在我看来,我有一个printing.pdf.pr
<%= form_for(:img, method: "post", url: {action: "printer"}) do |f| %>
<input type="hidden" id="image_attach" name="image_attach">
<%= f.submit "Print" %>
<%end%>
在我看来,我有一个printing.pdf.prawn文件没有打开
由于某些原因,我没有被重定向到pdf文件
我得到以下错误
My routes.rb文件
Watermark::Application.routes.draw do
root "posts#index"
post ':controller(/:action(/:id(.:format)))'
get ':controller(/:action(/:id(.:format)))'
end
重定向到(:action=>“printing.pdf”)
应该是
重定向到(:action=>“打印”)
Watermark::Application.routes.draw do
root "posts#index"
post ':controller(/:action(/:id(.:format)))'
get ':controller(/:action(/:id(.:format)))'
end