title: Routing Error : No route matches "/images/new" using scaffold code
body: <p>I'm inexperienced with Rails, so I may be overlooking something basic, but I'm following the <a href="https://github.com/thoughtbot/paperclip/wiki/Usage" rel="nofollow">Paperclip wiki's documentation</a> for adding image attachments and after modifying the related files as indicated there, <code>/images/new</code> works as expected, until the form is submitted (form partial has been modified to include a file-upload field for the attachment in place of the generated database fields). The response is this:</p>
  
  <blockquote>
    <p>Routing Error</p>
    
    <p>No route matches "/images/new"</p>
  </blockquote>
  
  <p>And the rails server outputs this: </p>
  
  <blockquote>
    <p>Started POST "/images/new" for 127.0.0.1 at Tue Mar 15 16:19:45 -0500 2011</p>
    
    <p>ActionController::RoutingError (No route matches "/images/new"):</p>
    
    <p>Rendered /usr/lib/ruby/gems/1.8/gems/actionpack-3.0.5/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.0ms)</p>
  </blockquote>
  
  <p>I created an Image model to allow for handling of each image attachment independently of the Project model which they will be associated with (haven't done any of that yet).</p>
  
  <p>Here is my images/_form.html.erb : </p>
  
  <pre><code>&lt;%= form_for :image, :as =&gt; @image, :html =&gt; { :multipart =&gt; true } do |f| %&gt;
    &lt;% if @image.errors.any? %&gt;
      &lt;div id="error_explanation"&gt;
        &lt;h2&gt;&lt;%= pluralize(@image.errors.count, "error") %&gt; prohibited this image from being saved:&lt;/h2&gt;
        &lt;ul&gt;
        &lt;% @image.errors.full_messages.each do |msg| %&gt;
          &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
        &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
  &lt;% end %&gt;
  &lt;div class="field"&gt;
      &lt;%= f.label :img %&gt;&lt;br /&gt;
      &lt;%= f.file_field :img %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :project_id %&gt;&lt;br /&gt;
      &lt;%= f.text_field :project_id %&gt;
    &lt;/div&gt;
    &lt;div class="field"&gt;
      &lt;%= f.label :alt %&gt;&lt;br /&gt;
      &lt;%= f.text_area :alt %&gt;
    &lt;/div&gt;
    &lt;div class="actions"&gt;
      &lt;%= f.submit %&gt;
    &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>And here is my routes.rb</p>
  
  <pre><code>App2::Application.routes.draw do
    resources :images
    resources :projects
    get "pages/about"
    get "pages/contact"
    root :to =&gt; "projects#index"
  end
  </code></pre>
  
  <p>And <code>app/models/image.rb</code>:</p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
      has_attached_file   :img
  #                       :styles =&gt; {    :thumb =&gt; "150x150&gt;", 
  #                                   :large     =&gt; "800x600&gt;", 
  #                                   :hd =&gt; "1920x1080&gt;" 
  #                               }
  end
  </code></pre>
  
  <p>Couldn't find any clear information related to this error that seemed relevant to my configuration, so I'd appreciate some more experienced eyes looking over this with me. I'll post more info if needed.</p>