Sha256: 67adb8b7dbdebef1aacbc2cf9b662437f2c0260fa3000b0785d49cfdfb04054f

Contents?: true

Size: 720 Bytes

Versions: 62

Compression:

Stored size: 720 Bytes

Contents

module Workarea
  module ContentAssetsHelper
    # 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.
    #
    # @param content_asset [Workarea::Content::Asset]
    # @param options [Hash] any valid option for Rails' `url_to_asset`
    # @return [String] the content asset url string
    #
    def url_to_content_asset(content_asset, options={})
      source =  if content_asset.type == 'image'
                  content_asset.optim.url
                else
                  content_asset.url
                end

      url_to_asset(source, options)
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.26 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.45 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.25 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.23 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.44 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.22 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.43 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.21 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.42 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.20 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.41 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.19 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.40 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.18 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.39 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.17 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.38 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.5.16 app/helpers/workarea/content_assets_helper.rb
workarea-core-3.4.37 app/helpers/workarea/content_assets_helper.rb