| Module | Merb::Assets::AssetHelpers |
| In: |
lib/merb-assets/assets.rb
|
Helpers for handling asset files.
| ASSET_FILE_EXTENSIONS | = | { :javascript => ".js", :stylesheet => ".css" | :nodoc: |
Returns the URI path to a particular asset file. If local_path is true, returns the path relative to the Merb.root, not the public directory. Uses the path_prefix, if any is configured.
| asset_type<Symbol>: | Type of the asset (e.g. :javascript). |
| filename<~to_s>: | The path to the file. |
| local_path<Boolean>: | If true, the returned path will be relative to the Merb.root, otherwise it will be the public URI path. Defaults to false. |
| String: | The path to the asset. |
asset_path(:javascript, :dingo) # => "/javascripts/dingo.js" asset_path(:javascript, :dingo, true) # => "public/javascripts/dingo.js"