Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Combining link_to with render :partial

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?

like image 829
user388069 Avatar asked Dec 30 '10 01:12

user388069


1 Answers

This should do it:

<%= link_to render(:partial => 'shared/logo'), root_url %>
like image 78
vonconrad Avatar answered Oct 13 '22 00:10

vonconrad