On Thu, Nov 10, 2011 at 4:26 PM, Leo M. <[email protected]> wrote:

> 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?
>
> post the code on the link_to helper to see how you are trying to access
that path

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to