Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make templates easier to debug by not burying errors #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mattvague
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant