-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Hey folks 👋
When @clayton-shopify hooked us up with better_html in https://github.com/Shopify/help/pull/7582, it introduced a bug that was fixed in https://github.com/Shopify/help/pull/7839.
What ended up happening was that when the config.allow_single_quoted_attributes = false is set and the web-console gem is installed, anytime an error occurs when developing locally causes the Rails error page to fail to render. https://github.com/Shopify/help/pull/7839 has a bit more of a description of this problem.
The one solution I discovered from the better-html README was to exclude running better-html on any of the ERB templates from the app's gems via:
BetterHtml.configure do |config|
config.allow_single_quoted_attributes = false
config.template_exclusion_filter = Proc.new { |filename| !filename.start_with?(Rails.root.to_s) }
endI wasn't able to figure out a way to exclude only the web-console gem's ERB templates. The following method didn't work:
BetterHtml.configure do |config|
config.allow_single_quoted_attributes = false
config.template_exclusion_filter = proc do |filename|
filename.include?('web_console')
end
endLet me know if there's any extra info I can provide 😄