Module: AsplesSinatra::Helpers

Defined in:
lib/asples_sinatra/helpers.rb

Instance Method Summary collapse

Instance Method Details

#input(name, options = {}) ⇒ Object



3
4
5
6
7
# File 'lib/asples_sinatra/helpers.rb', line 3

def input(name, options={})
  template_path = File.join(File.dirname(File.expand_path(__FILE__)), '/templates/input.haml')
  tmpl = Tilt.new(template_path)
  tmpl.render(self, options.merge!({field_name: name}))
end