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 -- 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?hl=en -~----------~----~----~----~------~----~------~--~---
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 Nantz <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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'' } %> > > Any ideas, thanks > > ~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) --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Shandy Nantz 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 Wang --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
> > -- > 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 -- 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?hl=en -~----------~----~----~----~------~----~------~--~---