mdude wrote:> I''m a basecamp user. At basecamp URl such as
> http://myproject.projectpath.com/projects/488470/milestones/new, both
> projects and milestones are controllers (are they?), 488470 is project
> id and new is method of milestones. Usually, you get
> http://hostname/controller/method/otherinfo, but how they put their url
> together and let rails now how to interprete the URL? via route? Can
> any body gives some details?
>
> Thanks a lot!
I can''t say for sure about the BaseCamp internals, but this is only
mapping to one controller.
Probably some routing like:
map.connect ''projects/:project_id/milestones/:action'',
:controller => milestone
or, if you put it in the right sequence of routes so that it doesn''t
conflict with other routes you might could just do:
map.connect ''projects/:project_id/:controller/:action''
--
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-/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
-~----------~----~----~----~------~----~------~--~---