module Flatrack::AssetExtensions

Provides asset helpers to various parts of a flatrack site.

Public Instance Methods

asset_path(path, _ = {}) click to toggle source

The path to a given asset @param path [String] the asset name or path @return [String]

# File lib/flatrack/asset_extensions.rb, line 7
def asset_path(path, _ = {})
  File.join('/', mount_path, 'assets', path.to_s)
end
mount_path() click to toggle source
Calls superclass method
# File lib/flatrack/asset_extensions.rb, line 11
def mount_path
  a = singleton_class.ancestors
  has_super = a[a.index(AssetExtensions) + 1].method_defined? __method__
  has_super ? super : '/'
end