Permalink
Browse files

Load sprockets asset helpers when mounting /assets

- Missing helpers here will cause fails if the end user has
  application.css manifest files that use asset helpers.
  • Loading branch information...
1 parent 54b37cf commit 7799692e377b5e4f5383f799350d0deb69086428 Davis W. Frank & Rajan Agaskar committed Nov 27, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/jasmine/application.rb
@@ -19,6 +19,11 @@ def self.app(config = Jasmine::RunnerConfig.new)
use Rack::Jasmine::CacheControl
if Jasmine::Dependencies.rails_3_asset_pipeline?
map('/assets') do
+ #load the Sprockets asset helpers
+ Rails.application.assets.context_class.instance_eval do
+ include ::Sprockets::Helpers::IsolatedHelper
+ include ::Sprockets::Helpers::RailsHelper
+ end
run Rails.application.assets
end
end

0 comments on commit 7799692

Please sign in to comment.