Module: Flatrack::AssetExtensions
- Included in:
- View
- Defined in:
- lib/flatrack/asset_extensions.rb
Overview
Provides asset helpers to various parts of a flatrack site.
Instance Method Summary collapse
-
#asset_path(path, _ = {}) ⇒ String
The path to a given asset.
- #mount_path ⇒ Object
Instance Method Details
#asset_path(path, _ = {}) ⇒ String
The path to a given asset
7 8 9 |
# File 'lib/flatrack/asset_extensions.rb', line 7 def asset_path(path, _ = {}) File.join('/', mount_path, 'assets', path.to_s) end |
#mount_path ⇒ Object
11 12 13 14 15 |
# 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 |