Reputation: 153
I would like to combine 2 commands into 1, if its possible.
<%= render :partial => 'shared/logo' %>
<%= link_to 'Dashboard', root_url %>
I would like to call the logo in the shared directory and have it be a link at the same time.
How would I write this?
Upvotes: 12
Views: 15891
Reputation: 25377
This should do it:
<%= link_to render(:partial => 'shared/logo'), root_url %>
Upvotes: 20