Testing for Form Submission?


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

Here's the form:

<% form_for :dump, :url => { :controller => "mycontroller", :action=>
"csv_reader" }, :html => { :multipart => true } do |f| -%>
                <label for="file">
                <td><b><i>Select a CSV File: </i></b></td>
                <td><%= file_field_tag 'file' %></td>
                <td colspan='2'><%= submit_tag "Submit" %></td>
<% end %>