testdouble / jasmine-rails

A Jasmine runner for rails projects that's got you covered in both the terminal and the browser
http://rubygems.org/gems/jasmine-rails
MIT License
378 stars 154 forks source link

Protect against nil source in offline_asset_paths #143

Closed werkshy closed 10 years ago

werkshy commented 10 years ago

The monkey-patched offline asset path stuff was receiving a nil 'source' argument in our app and crashing before writing the assets and runner.html. It seems prudent to just ignore these. (This PR fixes the problem for us).

FWIW the line in our code that seemed to be triggering this was this:

"#{ActionController::Base.asset_host}#{ActionController::Base.helpers.asset_path(self.checkout_image)}",

I think in this case self.checkout_image is nil.

searls commented 10 years ago

Landed in 0.10.2