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, ={}) haml_tag :img, .merge(src: url) end |
#link_to(label, path) ⇒ Object
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 |