lib/jammit/controller.rb in jammit-0.2.7 vs lib/jammit/controller.rb in jammit-0.2.8

- old
+ new

@@ -7,11 +7,11 @@ VALID_FORMATS = [:css, :js, :jst] SUFFIX_STRIPPER = /-(datauri|mhtml)\Z/ - NOT_FOUND_PATH = "#{ASSET_ROOT}/public/404.html" + NOT_FOUND_PATH = "#{PUBLIC_ROOT}/404.html" after_filter :cache_package if perform_caching # The "package" action receives all requests for asset packages that haven't # yet been cached. The package will be built, cached, and gzipped. @@ -80,9 +80,10 @@ end end +# Make the Jammit::Controller available to Rails as a top-level controller. ::JammitController = Jammit::Controller if RAILS_ENV == 'development' ActionController::Base.class_eval do append_before_filter { Jammit.reload! }