Forum: Ruby on Rails Routing question

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C5de46ba2bbb6ac7a0744ddae42d60f5?d=identicon&s=25 DanC (Guest)
on 2009-04-14 16:00
(Received via mailing list)
I have a resource for jobs on my application and I am familiar with
RESTful routes etc. I am also happy adding some custom routes to my
controller.

My question is, can I create an alias controller, i.e. instead of
www.mysite.com/jobs can I use www.mysite.com/alias  as the 'jobs'
isn't very intuitive for what the app is doing.

Can I do this in routes.rb so I don't have to create any files?

Better still would be to set up a sub-domain type route that worked
like alias.mysite.com = mysite.com/jobs

Again I am unsure on whether this is possible.

Any advice or quality links to good resources would be appreciated

Regards,

Dan
Ab0b702e7fcc79bb7d2c6c67f64e1b4d?d=identicon&s=25 Tim (Guest)
on 2009-04-14 22:21
(Received via mailing list)
map.resources :jobs, :as => :alias

Hope that helps!
Tm
This topic is locked and can not be replied to.