title: Ruby on Rails undefined method `products_path' routing issue
body: <p>It's been awhile since I've worked in Rails and I'm having some issues with setting up my routes properly. Any help would be greatly appreciated.</p>
  
  <pre><code>URL: http://localhost:3000/admin/products/new
  
  Error: undefined method `products_path' for #&lt;#&lt;Class:0x007f9f569d0150&gt;:0x007f9f578ccb18&gt;
  </code></pre>
  
  <p>rake routes</p>
  
  <pre><code>admin_products     GET    /admin/products(.:format)          admin/products#index
                     POST   /admin/products(.:format)          admin/products#create
  new_admin_product  GET    /admin/products/new(.:format)      admin/products#new
  edit_admin_product GET    /admin/products/:id/edit(.:format) admin/products#edit
  admin_product GET         /admin/products/:id(.:format)      admin/products#show
                     PUT    /admin/products/:id(.:format)      admin/products#update
                     DELETE /admin/products/:id(.:format)      admin/products#destroy
  </code></pre>
  
  <p>routes.rb</p>
  
  <pre><code>Aneprize::Application.routes.draw do
    devise_for :admins, :users
  
    namespace :admin do
      match '/', to: 'dashboard#index', as: '/'
  
      authenticated :admin do
        root to: 'dashboard#index', as: :root
  
        resources :products do
          resource  :contest
          resources :bids
          resources :photos
          resources :tags
        end
      end
    end
  
    root to: 'contests#index'
  end
  </code></pre>
  
  <p>product.rb</p>
  
  <pre><code>class Product &lt; ActiveRecord::Base
    attr_accessible :name, :retail_price, :short_description, :long_description, :weight
  
    has_one  :contest, dependent: :destroy
    has_many :photos,  dependent: :destroy
    has_many :bids,    dependent: :destroy
    has_many :tags
  
    validates :name, :short_description, :long_description, presence: true
    validates :retail_price, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 0 }
    validates :weight, presence: true, numericality: { only_integer: true, greater_than_or_equal_to: 1 }
  end
  </code></pre>
  
  <p>contest.rb</p>
  
  <pre><code>class Contest &lt; ActiveRecord::Base
    attr_accessible :product_id, :duration
  
    belongs_to :product, dependent: :destroy
  
    validates :product_id, presence: true, numericality: { only_integer: true, greater_than: 0 }
    validates :duration,   presence: true, numericality: { only_integer: true, greater_than: 2 }
  end
  </code></pre>
  
  <p>product.rb</p>
  
  <pre><code>class Photo &lt; ActiveRecord::Base
    attr_accessible :product_id, :image_url
  
    belongs_to :product
  
    validates :product_id, presence: true, numericality: { only_integer: true, greater_than: 0 }
    validates :image_url,  presence: true, format: { with: /^[^-\d].+/ }
  end
  </code></pre>
  
  <p>bid.rb</p>
  
  <pre><code>class Bid &lt; ActiveRecord::Base
    attr_accessible :product_id, :account_id, :amount
  
    belongs_to :account
    belongs_to :product, dependent: :destroy
  
    validates :account_id, :product_id, :amount, presence: true, numericality: { only_integer: true, greater_than: 0 }
  end
  </code></pre>
  
  <p>tag.rb</p>
  
  <pre><code>class Tag &lt; ActiveRecord::Base
    attr_accessible :name, :product_id
  
    belongs_to :product
  
    validates :name, presence: true, format: { with: /^\D+$/ }
    validates :product_id, presence: true, numericality: { only_integer: true, greater_than: 0 }
  end
  </code></pre>