crowdint/slim_assets — pull request #5 by mattvague (2013-05-18 01:47:58+00:00)
Title: Make templates easier to debug by not burying errors

I've found it very difficult to debug issues within .hbs.slim (or whatever) templates because slim_assets burys the errors.

For instance, if I try to access a non existant helper previously I would get the following unhelpful error:

> Error: You must pass a string or Handlebars AST to Handlebars.compile. You passed true
(in /Users/mattvague/Work/MetaLab/everchron/app/assets/templates/documents/form.hbs.slim)

But this patch will give you:

> undefined method `nice_date' for...

I feel like there's probably a reason you used `Rails.logger.error` but I'm not sure what it is