Module: Haml::Filters::DeferJS
- Includes:
- Base
- Defined in:
- lib/rbbt/rest/common/misc.rb
Instance Method Summary collapse
Instance Method Details
#render(text) ⇒ Object
237 238 239 240 241 242 243 244 245 246 |
# File 'lib/rbbt/rest/common/misc.rb', line 237 def render(text) defer_text =<<-EOF %script :plain defer(function(){ #{text.gsub(/^/," ")} }) EOF Haml::Engine.new(defer_text).to_html end |