Module: Sinatra::Templates

Defined in:
lib/sinatra/js.rb

Instance Method Summary collapse

Instance Method Details

#rjs(template, options = {}, locals = {}) ⇒ Object

add support for .rjs



19
20
21
22
23
# File 'lib/sinatra/js.rb', line 19

def rjs(template, options={}, locals={})
  options[:outvar] = '@_out_buf'
  options[:layout] = false
  render :rjs, template, options, locals
end