Hi there!

I experienced an issue with routing.

Basically, I'm trying to follow step-by-step the Rails' official guides
process for what concerns the nested routing.
So, I have Newspapers that has_many :ads , and :ads belongs to
:newspaper .

What I did was simply trying to obtain an URL like this:

http://localhost/newspapers/1/ads/1

but when I set routes.rb in this way:

resources :newspapers do
   resources :ads
end

(as specified in Rails' guides), I obtain this error :


No route matches {:controller=>"ads", :action=>"show", :id=>#<Ad id: 1,
product: "an ad", created_at: "2011-11-10 19:54:12", updated_at:
"2011-11-10 19:55:06", newspaper_id: 1>}

Am I forgetting something?

Cheers,
Leo

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to