Hi there.. A newbie question... The link below links to the users-page..that works fine... <li><%= link_to ''MyLink'', user_path(logged_in_user) -%></li> But i don''t want the link ''Mylink'' but the username instead of. The username is stored in logged_in_user.username How can i realize..this... swoany -- 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 -~----------~----~----~----~------~----~------~--~---
Remco Swoany wrote:> <li><%= link_to ''MyLink'', user_path(logged_in_user) -%></li> > > But i don''t want the link ''Mylink'' but the username instead of. The > username is stored in logged_in_user.username<%= link_to logged_in_user.username, user_path(logged_id_user) -%> Lutz -- 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 -~----------~----~----~----~------~----~------~--~---
Lutz Horn wrote:> Remco Swoany wrote: >> <li><%= link_to ''MyLink'', user_path(logged_in_user) -%></li> >> >> But i don''t want the link ''Mylink'' but the username instead of. The >> username is stored in logged_in_user.username > > <%= link_to logged_in_user.username, user_path(logged_id_user) -%> > > LutzHi Lutz....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 -~----------~----~----~----~------~----~------~--~---
Hi, Remco Swoany wrote:> Lutz Horn wrote: >> <%= link_to logged_in_user.username, user_path(logged_id_user) -%>Take a look at http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#M000491 for more details of the link_to helper. Lutz -- 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 -~----------~----~----~----~------~----~------~--~---