Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 7799692e377b5e4f5383f799350d0deb69086428 1 parent 54b37cf
Davis W. Frank & Rajan Agaskar authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/jasmine/application.rb
View
5 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
Please sign in to comment.
Something went wrong with that request. Please try again.