Skip to content

Instantly share code, notes, and snippets.

@BitPuffin
Created May 20, 2011 03:55
Show Gist options
  • Save BitPuffin/982319 to your computer and use it in GitHub Desktop.
Save BitPuffin/982319 to your computer and use it in GitHub Desktop.
<%= form_for @image, :html => {:multipart => true} do |f| %>
<%=f.error_messages%>
<p>
<%= f.label :name %> <br />
<%= f.text_field :name %><br/>
<%= f.label :password%>
<%= f.text_field :password%>
</p>
<p>
<%= f.file_field :image%>
</p>
<p> <%=f.submit%> </p>
<% end %>
gives error:
NoMethodError in Pages#main
Showing /home/papi/Dropbox/Frozen melonbox/App/filepile/app/views/pages/main.html.erb where line #8 raised:
undefined method `model_name' for NilClass:Class
Extracted source (around line #8):
5: <div id="not_logged_in">
6: <br />
7: <center><p class="lightgrey_none_large">Choose the file you wish to upload: </p></center>
8: <%= form_for @image, :html => {:multipart => true} do |f| %>
9: <%=f.error_messages%>
10: <p>
11: <%= f.label :name %> <br />
Rails.root: /home/papi/Dropbox/Frozen melonbox/App/filepile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment