Module: Integrity::Helpers::Rendering
- Included in:
- Integrity::Helpers
- Defined in:
- lib/integrity/helpers/rendering.rb
Instance Method Summary collapse
- #partial(template, locals = {}) ⇒ Object
- #show(view, options = {}) ⇒ Object
- #stylesheet_hash ⇒ Object
- #stylesheets(*sheets) ⇒ Object
Instance Method Details
#partial(template, locals = {}) ⇒ Object
20 21 22 |
# File 'lib/integrity/helpers/rendering.rb', line 20 def partial(template, locals={}) haml("_#{template}".to_sym, :locals => locals, :layout => false) end |
#show(view, options = {}) ⇒ Object
15 16 17 18 |
# File 'lib/integrity/helpers/rendering.rb', line 15 def show(view, ={}) @title = (*[:title]) haml view end |
#stylesheet_hash ⇒ Object
11 12 13 |
# File 'lib/integrity/helpers/rendering.rb', line 11 def stylesheet_hash @_hash ||= Digest::MD5.file(.views + "/integrity.sass").hexdigest end |
#stylesheets(*sheets) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/integrity/helpers/rendering.rb', line 4 def stylesheets(*sheets) sheets.each { |sheet| haml_tag(:link, :href => root_path("/#{sheet}.css"), :type => "text/css", :rel => "stylesheet") } end |