Sha256: a8a83f5b09b57754d69a39979044cf82abe62a53bf27c78dc7f459f48a0e3112

Contents?: true

Size: 404 Bytes

Versions: 5

Compression:

Stored size: 404 Bytes

Contents

module Rails2AssetPipeline
  module ViewHelpers
    def pipeline_path(asset)
      data = Rails2AssetPipeline.env[asset]
      return "/assets/NOT_FOUND" unless data
      asset = "/assets/#{asset}"

      if Rails2AssetPipeline::STATIC_ENVIRONMENTS.include?(Rails.env)
        asset.sub(/(\.[\.a-z]+$)/, "-#{data.digest}\\1")
      else
        "#{asset}?#{data.mtime.to_i}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails2_asset_pipeline-0.1.4 lib/rails2_asset_pipeline/view_helpers.rb
rails2_asset_pipeline-0.1.3 lib/rails2_asset_pipeline/view_helpers.rb
rails2_asset_pipeline-0.1.2 lib/rails2_asset_pipeline/view_helpers.rb
rails2_asset_pipeline-0.1.1 lib/rails2_asset_pipeline/view_helpers.rb
rails2_asset_pipeline-0.1.0 lib/rails2_asset_pipeline/view_helpers.rb