title: Undefined method "_path" in rails
body: <p>I am trying to create a new model and provide user a link to a form to fill the model object.</p>
  
  <p>My model (/models/paypal_order):</p>
  
  <pre><code>class PaypalOrder &lt; ActiveRecord::Base
      attr_accessor :card_number, :card_verification
  
  end
  </code></pre>
  
  <p>My controller (controllers/paypal_order_controller.rb):</p>
  
  <pre><code>class PaypalOrderController &lt; ApplicationController
  
      def new
          @paypal_order = PaypalOrder.new
      end
  
  end
  </code></pre>
  
  <p>My view (views/paypal_order/new.html.erb):</p>
  
  <pre><code>&lt;%form_for PaypalOrder.new do |f|%&gt;  #also tried &lt;%form_for @paypal_order do |f|%&gt;
  &lt;%= f.error_messages %&gt;
  &lt;p&gt;
      &lt;%= f.label :first_name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :first_name %&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :last_name %&gt;&lt;br /&gt;
      &lt;%= f.text_field :last_name %&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :card_type %&gt;&lt;br /&gt;
      &lt;%= f.select :card_type, [["Visa","visa"],["MasterCard", "master"],["Discover","discover"],["American Express","american_express"]] %&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :card_number %&gt;&lt;br /&gt;
      &lt;%= f.text_field :card_number %&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :card_verification, "Card Verification Value (CVV)" %&gt;&lt;br /&gt;
      &lt;%= f.text_field :card_verification %&gt;
  &lt;/p&gt;
  &lt;p&gt;
      &lt;%= f.label :card_expires_on %&gt;&lt;br /&gt;
      &lt;%= f.text_field :card_expires_on, :discard_day =&gt;true, :start_year =&gt; Date.today.year, :end_year =&gt; (Date.today.year+25), :add_month_numbers =&gt; true %&gt;
  &lt;/p&gt;
  &lt;%end%&gt;
  </code></pre>
  
  <p>The link:</p>
  
  <pre><code>  &lt;div class="payment_options"&gt;
    &lt;div class="available_payment_options"&gt;
    &lt;div class="online_payment_option"&gt;
      &lt;h3&gt;PayPal&lt;/h3&gt;
      &lt;%= link_to "Checkout", new_paypal_order_path %&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>entry in routes.rb:</p>
  
  <pre><code>resources :paypal_order
  </code></pre>
  
  <p>But on clicking the link I'm getting the following error:</p>
  
  <pre><code>NoMethodError in Paypal_order#new
  
  Showing /home/nish/repos/new/test/voylla_staging_changes/app/views/paypal_order/new.html.erb where line #1 raised:
  
  undefined method `paypal_orders_path' for #&lt;#&lt;Class:0x101f7e98&gt;:0x101e5b94&gt;
  Extracted source (around line #1):
  
  1: &lt;%form_for PaypalOrder.new do |f|%&gt;
  2:  &lt;%= f.error_messages %&gt;
  3:  &lt;p&gt;
  4:      &lt;%= f.label :first_name %&gt;&lt;br /&gt;
  </code></pre>
  
  <p>I am not able to understand why I am getting this error. Also why is the form looking for <code>paypal_order**s**_path</code>, shouldn't it be <code>paypal_order_path</code> instead</p>
  
  <p><strong>EDIT</strong> rake routes output:</p>
  
  <pre><code>                               paypal_order_index GET    /paypal_order(.:format)                                                   {:action=&gt;"index", :controller=&gt;"paypal_order"}
                                                    POST   /paypal_order(.:format)                                                   {:action=&gt;"create", :controller=&gt;"paypal_order"}
                                   new_paypal_order GET    /paypal_order/new(.:format)                                               {:action=&gt;"new", :controller=&gt;"paypal_order"}
                                  edit_paypal_order GET    /paypal_order/:id/edit(.:format)                                          {:action=&gt;"edit", :controller=&gt;"paypal_order"}
                                       paypal_order GET    /paypal_order/:id(.:format)                                               {:action=&gt;"show", :controller=&gt;"paypal_order"}
                                                    PUT    /paypal_order/:id(.:format)                                               {:action=&gt;"update", :controller=&gt;"paypal_order"}
                                                    DELETE /paypal_order/:id(.:format)                                               {:action=&gt;"destroy", :controller=&gt;"paypal_order"}
  </code></pre>