huard.elise-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-20 08:13 UTC
complex restful routes
Hi, i''d like to know how you handle complex restful routes for instance table - join - table2 or set has_many subset has_many subsubset won''t the route get a bit awkward ? I''d like to avoid having more than 2 models in my routes. How would you handle this ? would you do: map.resources :set, :has_many => :subset map.resources :subset, :has_many => :subsubset ? this is not ideal as the subset model gets complex to handle both types of routes. How do you do it ? Namespaces ? Elise --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
huard.elise-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Hi, > > i''d like to know how you handle complex restful routes > for instance > table - join - table2 > or > set has_many subset has_many subsubset > won''t the route get a bit awkward ? I''d like to avoid having more > than 2 models in my routes. > > How would you handle this ? would you do: > map.resources :set, :has_many => :subset > map.resources :subset, :has_many => :subsubset > ? > this is not ideal as the subset model gets complex to handle both > types of routes. > How do you do it ? Namespaces ? > > Elise<snip> Hi Elise I had a question about RESTful stuff last week, and I got some good general design tips as part of the help that I received. http://www.ruby-forum.com/topic/153102#new Perhaps there may be something in there that can help the way you attack the problem. I unfortunately, am still a REST-noob, so would rather not venture an answer. --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
huard.elise-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2008-May-20 09:27 UTC
Re: complex restful routes
thanks - it''s indeed a start of a pointer. Elise On May 20, 10:42 am, Rory McKinley <rorymckinleyli...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> huard.el...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote: > > Hi, > > > i''d like to know how you handle complex restful routes > > for instance > > table - join - table2 > > or > > set has_many subset has_many subsubset > > won''t the route get a bit awkward ? I''d like to avoid having more > > than 2 models in my routes. > > > How would you handle this ? would you do: > > map.resources :set, :has_many => :subset > > map.resources :subset, :has_many => :subsubset > > ? > > this is not ideal as the subset model gets complex to handle both > > types of routes. > > How do you do it ? Namespaces ? > > > Elise > > <snip> > Hi Elise > > I had a question about RESTful stuff last week, and I got some good > general design tips as part of the help that I received. > > http://www.ruby-forum.com/topic/153102#new > > Perhaps there may be something in there that can help the way you attack > the problem. > > I unfortunately, am still a REST-noob, so would rather not venture an > answer.--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---