module Tension::Helper
Helper
is included in ActionView::Helpers so it can be called from templates and layouts.
Public Instance Methods
best_javascripts(*args)
click to toggle source
Determines the best JavaScripts to be included in a template based on the current controller and action.
# File lib/tension/helper.rb, line 20 def best_javascripts(*args) build_tags( Tension::JS, *args ) end
best_stylesheets(*args)
click to toggle source
Determines the best stylesheets to be included in a template based on the current controller and action.
# File lib/tension/helper.rb, line 13 def best_stylesheets(*args) build_tags( Tension::CSS, *args ) end
Private Instance Methods
asset_for(type, path, *args)
click to toggle source
# File lib/tension/helper.rb, line 48 def asset_for(type, path, *args) return nil if asset_context.nil? case type when Tension::CSS stylesheet_link_tag( path, *args ) when Tension::JS javascript_include_tag( path, *args ) end end