Module: Haml::Filters::DeferJS
- Includes:
- Base
- Defined in:
- lib/rbbt/rest/common/misc.rb
Instance Method Summary collapse
Instance Method Details
#render(text) ⇒ Object
372 373 374 375 376 377 378 379 380 381 382 383 |
# File 'lib/rbbt/rest/common/misc.rb', line 372 def render(text) step_path = Thread.current["step_path"] text = "" if text.nil? defer_text ="%script\n:plain\n defer(function(step_path){\n\#{text.gsub(/^/,\" \")}\n }, '\#{step_path}')\n EOF\n Haml::Engine.new(defer_text).to_html \nend\n" |