New to Rails relationship route problem

Hi Folks.

Hope you can advise a newbie to rails. I have to models set up Site &
Note. A site can have many notes where a note belongs to a site. My 2
models are.

class Note < ActiveRecord::Base
  belongs_to :site

class Site < ActiveRecord::Base
  has_many :notes

Within the routes I setup the resources ie.

resources :sites do
    resources :notes

So an example link from the sites table once I created a site will be.

<%=link_to 'Add', new_site_note_path(site) %>

This gives me the URL

I think this is correct so far. But I'm just getting a routes error of

No route matches {:action=>"show", :controller=>"notes"}

Please point me to where I'm going wrong???.

Can you post the code for the file that is causing the error? It should be displayed in your console/log.

Just a guess here, but most likely there is some code that redirects to a note_path that may need to be updated to point to a site_note_path.