Module: Haml::Filters::DeferJS
- Includes:
- Base
- Defined in:
- lib/rbbt/rest/common/misc.rb
Instance Method Summary collapse
Instance Method Details
#render(text) ⇒ Object
255 256 257 258 259 260 261 262 263 264 |
# File 'lib/rbbt/rest/common/misc.rb', line 255 def render(text) defer_text =<<-EOF %script :plain defer(function(){ #{text.gsub(/^/," ")} }) EOF Haml::Engine.new(defer_text).to_html end |