Hello folks, In the old days, If i need to get something from the url into params, I just wrote a simple route rule: map.connect '':page_name'', :controller => ''pages'', :action => ''show_by_name'' And for the root of app: map.connect '''', :controller => ''pages'', :action => ''show_by_name'', :page_name => ''main'' Now in the RESTfull world, I don''t know how to accomplish same things, may you give me a clue please? Thanks, - Dunnil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 2/24/07, Human Dunnil <h.dunnil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello folks, > > In the old days, If i need to get something from the url into params, > I just wrote a simple route rule: > > map.connect '':page_name'', :controller => ''pages'', :action => ''show_by_name'' > > And for the root of app: > > map.connect '''', :controller => ''pages'', :action => ''show_by_name'', > :page_name => ''main'' > > Now in the RESTfull world, I don''t know how to accomplish same things, > may you give me a clue please?Those are both custom routes, so you won''t be able to use map.resources for them. map.connect will work fine. -- Rick Olson http://weblog.techno-weenie.net http://mephistoblog.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-/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 -~----------~----~----~----~------~----~------~--~---
Thanks Rick, I was not sure about it. On 2/25/07, Rick Olson <technoweenie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > On 2/24/07, Human Dunnil <h.dunnil-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello folks, > > > > In the old days, If i need to get something from the url into params, > > I just wrote a simple route rule: > > > > map.connect '':page_name'', :controller => ''pages'', :action => ''show_by_name'' > > > > And for the root of app: > > > > map.connect '''', :controller => ''pages'', :action => ''show_by_name'', > > :page_name => ''main'' > > > > Now in the RESTfull world, I don''t know how to accomplish same things, > > may you give me a clue please? > > Those are both custom routes, so you won''t be able to use > map.resources for them. map.connect will work fine. > > -- > Rick Olson > http://weblog.techno-weenie.net > http://mephistoblog.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-/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 -~----------~----~----~----~------~----~------~--~---