简体   繁体   中英

Rails and Authlogic. Show currently logged in user

I'm a first time authlogic implementer and everything has gone smoothly, until now. I want to display the username of the person currently logged in, beside "logout" and "edit profile" links, both of which work fine.

I can't figure out how to do it though. Any help is much appreciated.

Thanks.

<% if current_user %>
   <%=h current_user.username %>
<% end %>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM