On Sep 18, 8:32 am, Christoph_Petschnig <[EMAIL PROTECTED]> wrote:
> Hello, I don't know if this is a bug or a feature. When defining
> routes like:
>
>   map.resources :as, :has_many => 'bs'
>   map.resource :b, :has_many => 'cs'
>   map.resource :c
>
> I get:
>
> new_b_c GET    /b/cs/new     {:controller=>"cs", :action=>"new"}
>
> yet I want:
>
> new_b_c GET    /bs/:b_id/cs/new   {:controller=>"cs", :action=>"new"}
>
> which I get with adding:
>
>   map.resources :bs, :has_many => 'cs'
>
> Is this supposed to be this way?
> Thank you, regards Christoph

I think you want to use map.resources, not map.resource, in all of
those.

Jeff

REST with Rails: $295, Oct 4, Austin, TX:
http://www.purpleworkshops.com/workshops/rest-and-web-services
Discount code "PWRRGG" => 10% off
--~--~---------~--~----~------------~-------~--~----~
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