Forum: Ruby on Rails Can I route directly to Controller?

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.
Chris B. (Guest)
on 2006-06-08 21:48
(Received via mailing list)
I am trying to integrate a rails application with Zope.  My goal is to
slowly replace parts of the Zope site with Rails while trying to
maintain the original urls (where possible).

I am using Apache 1.3 with FCGI.  Right now my set up looks sort of like
the following:

Alias /rails/ /rails-app/public/
RewriteRule ^/rails/ - [L]
RewriteRule ^/(.*) http://zope-server/$1 [P,L]


I am using the /rails/ alias just for new development and stuff where
the url is not important or can be changed once Rails has fully replaced
Zope.

However, what I need now is a way to have something like /support map
directly to my rails support controller.  Is this even possible?



Thanks,



Chris
Jason P. (Guest)
on 2006-06-08 22:05
> However, what I need now is a way to have something like /support map
> directly to my rails support controller.  Is this even possible?

I may be missing something here, but /support should automatically route
to your support_controller.rb.

for anything else that you need to route, you can just change in
app/config/routes.rb.

for example, if you want to set /rails/ to route to support, you can set
a custom route like the following

map.connect '', :controller => 'support', :action => 'index'

Is this what you mean?
This topic is locked and can not be replied to.