Rails 3 / HAML: How Can I Output Haml Raw From A Variable?
I have some variables within rails that contain some divs like so: @layout_1 = ' .box_1 .column_4
.gutter
.column_4
.gutter
.column_4<
.gutter
.column_4
.gutter
.column_4<
Solution 1:
you would do the same with HAML as well in your .html.haml view file.
= raw @layout_1
or
= @layout_1.html_safe
Solution 2:
Not entirely sure this works, but give it a try:
- output = Haml::Engine.new(@layout1).render
!= output
Post a Comment for "Rails 3 / HAML: How Can I Output Haml Raw From A Variable?"