Skip to content

Commit

Permalink
don't try to register preprocessors when sprockets library is not ini…
Browse files Browse the repository at this point in the history
…tialised (app.assets is nil) closes toy#41
  • Loading branch information
toy committed Mar 10, 2014
1 parent 3521b37 commit 516ec7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/image_optim/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class ImageOptim
class Railtie < Rails::Railtie
initializer 'image_optim.initializer' do |app|
if app.config.assets.compress != false && app.config.assets.image_optim != false
if app.config.assets.compress != false && app.config.assets.image_optim != false && app.assets
image_optim = if app.config.assets.image_optim == true
ImageOptim.new
else
Expand Down

0 comments on commit 516ec7e

Please sign in to comment.