I have a form:
<%= form_tag :controller => "foo", :action => "boo", :multipart => true do %>
<%= file_field_tag "foo[bar]" %>
<% end %>
When I submit it, the param foo[bar]
gives "foo[bar]"=>"filename.png"
instead of an ActionDispatch
object.
Anybody have any clues what might be the cause here?
Thanks!
Solved. Needed to change the form_tag line to:
<%= form_tag ({:controller => "foo", :action => "boo"}), :enctype =>"multipart/form-data" do %>
<%= file_field_tag "foo[bar]" %>
<% end %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With