Module: Voidtools::Sinatra::ViewHelpers

Defined in:
lib/voidtools/sinatra/view_helpers.rb

Instance Method Summary collapse

Instance Method Details

#image_tag(url, options = {}) ⇒ Object



10
11
12
# File 'lib/voidtools/sinatra/view_helpers.rb', line 10

def image_tag(url, options={})
  haml_tag :img, options.merge(src: url)
end


4
5
6
7
8
# File 'lib/voidtools/sinatra/view_helpers.rb', line 4

def link_to(label, path)
  haml_tag :a, { href: path } do
    haml_concat label
  end
end