Forum: Ruby on Rails Linking controllers

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
fernando (Guest)
on 2007-05-30 22:43
(Received via mailing list)
Newbie question.
How do I link from a view in one controller to a view in another

David R. (Guest)
on 2007-05-30 23:36
(Received via mailing list)
link_to "some good link", :controller => 'other_controller', :action
=> 'some_action'

If you have your routes setup w/ map.resources, you'll have a number
of helpers for that as well:

  link_to "some good link", other_models_path
  link_to "some good link", new_other_model_path

Good luck
MichaelLatta (Guest)
on 2007-05-31 00:24
(Received via mailing list)
redirect_to :controller => controller, :action => action

This topic is locked and can not be replied to.