Link_to method of different controller

I want to link to a method of a different controller. I thought I new
how to do this but the code that I have is not working:

<%= link_to ‘Welcome Page’, { :action => ‘index’, :controller =>
‘music_controller’ } %>

Any ideas, thanks

~S

Shandy N. wrote:

I want to link to a method of a different controller. I thought I new
how to do this but the code that I have is not working:

<%= link_to ‘Welcome Page’, { :action => ‘index’, :controller =>
‘music_controller’ } %>

Did you try it without the “_controller” part?


Michael W.


blog : http://adityakircon.blogsome.com
ym : kirconboy
skype : adit_skype

Freedom is the right of all sentient beings (Optimus Prime)

That did it. Thanks. I knew it wqould be something simple. Thanks

you don’t need to type “music_controller”, type “music” is enough,
so the code should be

link_to ‘Welcome Page’,:controller=>“welcome”,:action=>“index”

On 9/19/07, Shandy N. [email protected] wrote:

~S

Posted via http://www.ruby-forum.com/.


blog : http://adityakircon.blogsome.com
ym : kirconboy
skype : adit_skype

Freedom is the right of all sentient beings (Optimus Prime)