<%= link_to ' ', user_path(current_user) %>
How do I make it so <% current user %>
displays the current user as a link.
Because in ruby whatever goes inside Link to is written as a string and not displayed as Ruby's answer.
<%= link_to ' ', user_path(current_user) %>
How do I make it so <% current user %>
displays the current user as a link.
Because in ruby whatever goes inside Link to is written as a string and not displayed as Ruby's answer.
Use below code replace name with field that stores user's name
<%= link_to current_user.name, user_path(current_user) %>