Module: Workarea::ContentAssetsHelper
- Defined in:
- app/helpers/workarea/content_assets_helper.rb
Instance Method Summary collapse
-
#url_to_content_asset(content_asset, options = {}) ⇒ String
Returns the path to the given content asset, including the asset host if one is configured via ‘Rails.application.config.action_controller.asset_host` or passed as the `host` option.
Instance Method Details
#url_to_content_asset(content_asset, options = {}) ⇒ String
Returns the path to the given content asset, including the asset host if one is configured via ‘Rails.application.config.action_controller.asset_host` or passed as the `host` option.
12 13 14 15 16 17 18 19 20 |
# File 'app/helpers/workarea/content_assets_helper.rb', line 12 def url_to_content_asset(content_asset, ={}) source = if content_asset.type == 'image' content_asset.optim.url else content_asset.url end url_to_asset(source, ) end |