Processing code within a partial


#1

I’m doing layouts and I have a question on how to process <%= … %>
tags within partials.

I have a standard.rhtml file with :

<%= render_partial "layouts/header" %>

and my _header.rhtml contains a tag as such:

<link_to “Categories”, :controller => “categories”, :action=> “list” %>

Yet when I run my page in the browser, all I see is the text contained
in the header and it looks like it’s not being processed.

Any help?


#2

William Zumwalt wrote:

I’m doing layouts and I have a question on how to process <%= … %>
tags within partials.

I have a standard.rhtml file with :

<%= render_partial "layouts/header" %>

and my _header.rhtml contains a tag as such:

<link_to “Categories”, :controller => “categories”, :action=> “list” %>

Yet when I run my page in the browser, all I see is the text contained
in the header and it looks like it’s not being processed.

Any help?

May be it’s a typo but you should add <% in front of link_to