ruby on rails - erb to haml conversion to apply body class -
i have theses 2 line in erb
<body class="<%= yield (:body_class) %>"> <% content_for :body_class, "my_class" %>
i have tried
- content_for :body_class my_class
for above haml conversion i'm not sure - correct or not ! , not able figure out haml conversion for
<body class="<%= yield (:body_class) %>">
any appreciated
you do:
%body{ class: "#{yield (:body_class)}" }
and
- content_for :body_class my_class
Comments
Post a Comment