Module: Rad::Assets::ViewHelper

Defined in:
lib/rad/assets/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#javascript_include_tag(*a) ⇒ Object



18
19
20
# File 'lib/rad/assets/view_helper.rb', line 18

def javascript_include_tag *a
  super(*packaged_assets(*a))
end

#packaged_assets(*http_paths) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'lib/rad/assets/view_helper.rb', line 2

def packaged_assets *http_paths
  resolved_http_paths = []
  http_paths.each do |http_path|
    if rad.assets.asset? http_path
      resolved_http_paths.push *rad.assets.resolve_http_paths(http_path)
    else
      resolved_http_paths << http_path
    end
  end
  resolved_http_paths
end


14
15
16
# File 'lib/rad/assets/view_helper.rb', line 14

def stylesheet_link_tag *a
  super(*packaged_assets(*a))
end