开发者

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?


This should do it:

<%= link_to render(:partial => 'shared/logo'), root_url %>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜