-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added support for annotate_rendered_view_with_filenames #122
Conversation
Fixes #76 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test for this new behavior?
@rafaelfranca Thanks for that feedback, I've refactored it to use internal config and I've also added a test for the new behavior. Please let me know if that's working the way you'd expect |
ff36a2e
to
e25615a
Compare
ActionView's erb template handler can annotate html with comments to indicate which file any given snippet of html comes from. This is very useful in development, but it isn't supported by better-html. This adds equivalent support to better-html, using the same approach that ActionView takes, so it should work automatically for anyone switching from rails' default erb handler.
This doesn't work with Rails 6.0 because the config was only added in 6.1: rails/rails@a673ce6 The CI here passes because it doesn't run the initializers I guess? We could just bump the minimum required version for Rails since 6.0 is no longer supported anyway. |
@etiennebarrie Does it throw an error? Or just not work on rails 6? It’s impossible to make this work on rails 6 because rails 6 overrides the preamble and postamble options for erubis |
Yes it prevents booting the app entirely, for example running
|
Few hours ago, I opened an issue for this #129 |
ActionView's erb template handler can annotate html with comments to indicate which file any given snippet of html comes from. This is very useful in development, but it isn't supported by better-html.
This adds equivalent support to better-html, using the same approach that ActionView takes, so it should work automatically for anyone switching from rails' default erb handler.