In my layout I want:
<body class="<%= yield (:body_class) %>">
And I also want to call it from another template:
<% content_for :body_class, "my_class" %>
In my layout I want:
<body class="<%= yield (:body_class) %>">
And I also want to call it from another template:
<% content_for :body_class, "my_class" %>
Voted too quickly. I'm not sure why, but these answers didn't work for me. A friend gave me this answer, which works:
but for the template, is what Marek suggested,