Hi-
I'm trying to create a file upload script using RoR but I am getting "You have a nil object when you didn't expect it!" and I think this is caused by the fact that the no form has been submitted. Is that right?
Here's the form:
<% form_for :dump, :url => { :controller => "mycontroller", :action=> "csv_reader" }, :html => { :multipart => true } do |f| -%> <table> <tr> <label for="file"> <td><b><i>Select a CSV File: </i></b></td> </label> <td><%= file_field_tag 'file' %></td> </tr> <tr> <td colspan='2'><%= submit_tag "Submit" %></td> </tr> </table> <% end %>
Thanks!