Class: ActionView::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/rev_manifest/actionview/base.rb

Instance Method Summary collapse

Instance Method Details

#compute_asset_path_with_rev_manifest(source, options = {}) ⇒ Object

Note:

Patch Helpers::AssetUrlHelper#compute_asset_path.



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/rev_manifest/actionview/base.rb', line 4

def compute_asset_path_with_rev_manifest(source, options = {})
  if RevManifest.include?(source)
    if RevManifest.enabled?
      RevManifest.resolve(source, options)
    else
      dir = RevManifest.asset_public_directories[options[:type]] || ""
      File.join(dir, source)
    end
  else
    compute_asset_path_without_rev_manifest(source, options)
  end
end