class Rails::Application - sprockets-rails-2.1.3 Documentation

# class Rails::Application

### Attributes

assets[W]

### Public Instance Methods

assets() click to toggle source

Returns Sprockets::Environment for app config.

    # File lib/sprockets/railtie.rb, line 22
    def assets
      @assets ||= Sprockets::Environment.new(root.to_s) do |env|
        env.version = ::Rails.env

        path = "#{config.root}/tmp/cache/assets/#{::Rails.env}"
        env.cache = Sprockets::Cache::FileStore.new(path)

        env.context_class.class_eval do
          include ::Sprockets::Rails::Helper
        end
      end
    end