Module: Haml::Filters::DeferJS
- Includes:
- Base
- Defined in:
- lib/rbbt/rest/common/misc.rb
Instance Method Summary collapse
Instance Method Details
#render(text) ⇒ Object
276 277 278 279 280 281 282 283 284 285 286 287 |
# File 'lib/rbbt/rest/common/misc.rb', line 276 def render(text) step_path = Thread.current["step_path"] defer_text =<<-EOF %script :plain defer(function(step_path){ #{text.gsub(/^/," ")} }, '#{step_path}') EOF Haml::Engine.new(defer_text).to_html end |