During refactoring it would be quite handy just to copy part of HAML template and paste it to helper\'s code. Currently in such cases 1) I have to rewrite that part of view from
From the reference:
def render_haml(code) engine = Haml::Engine.new(code) engine.render end
This initiates a new Haml engine and renders it.