Hey everyone, I''ve got a curious issue with Devise 1.2.1 on Rails 3.0.5. I''ve got everything working quite nicely with one small problem: the navigation links for my site that exist in the application controller get changed when on the devise views. For example, a link that would be localhost:3000/messages/inbox will turn into localhost:3000/devise/message/inbox when using one of the devise views, like users/edit and whatnot. Has anyone experienced this problem? My link_to''s explicitly state the destination controller and action, but I ain''t gettin any love here. Thanks in advance! - Jeff -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Phil On Tue, Apr 12, 2011 at 4:00 PM, Jeff Miller <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hey everyone, > I''ve got a curious issue with Devise 1.2.1 on Rails 3.0.5. I''ve got > everything working quite nicely with one small problem: the navigation > links for my site that exist in the application controller get changed > when on the devise views. For example, a link that would be > localhost:3000/messages/inbox will turn into > localhost:3000/devise/message/inbox when using one of the devise views, > like users/edit and whatnot. > > Has anyone experienced this problem? My link_to''s explicitly state the > destination controller and action, but I ain''t gettin any love here. >I''m guessing it''s assuming the controller & action you''re naming are relative to the device namespace. If you just use the explicit name of the route (whatevers_path, etc), you won''t have that problem. `rake routes | grep whatever` will be your friend in this.> > Thanks in advance! > - Jeff > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you, sir - you''ve saved my bacon as well as my mind. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Another solution to this (which I needed, since I was using a non- resourceful controller) is to prefix your controller name in the link_to with a "/", e.g. <%= link_to :controller => ''/ about'', :action...... On Apr 12, 6:01 pm, Jeff Miller <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Thank you, sir - you''ve saved my bacon as well as my mind. > > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.