Sha256: 844807c333abd546e3963fbcd4a2cd6bd30cc5183cd08728a9fc5b2ba9964286

Contents?: true

Size: 397 Bytes

Versions: 1

Compression:

Stored size: 397 Bytes

Contents

# encoding: utf-8

require 'classy_assets'

module Rack
  class ClassyAssets < Sinatra::Base
    ::ClassyAssets::Configuration.sprockets.mime_types.each do |ext, content_type|
      get "/#{::ClassyAssets::Configuration.asset_prefix}/*#{ext}" do |asset|
        content_type content_type
        ::ClassyAssets::Configuration.sprockets["#{asset}#{ext}"] || halt(404)
      end 
    end 
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
classy_assets-0.4.0 lib/rack/classy_assets.rb