Class: Sinatra::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/osheet/view_handler/tilt.rb

Instance Method Summary collapse

Instance Method Details

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

use this helper method to render Osheet views in Sinatra

> view files should be named: “#template.osheet”



36
37
38
39
# File 'lib/osheet/view_handler/tilt.rb', line 36

def osheet(template, options={}, locals={})
  options.merge! :layout => false, :default_content_type => ::Osheet::MIME_TYPE
  render :osheet, template, options, locals
end