From edcd78c4591705451ec89bf4862f1265d3274918 Mon Sep 17 00:00:00 2001 From: Peter Yates Date: Mon, 18 Oct 2021 17:05:17 +0100 Subject: [PATCH] Disable BetterHtml on Rails error pages It prevents the web console from being rendered and just shows the default uninformative error screen. More info here: https://github.com/Shopify/better-html/issues/50 --- config/initializers/better_html.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/initializers/better_html.rb b/config/initializers/better_html.rb index a5c78c62e10..3c05a67a398 100644 --- a/config/initializers/better_html.rb +++ b/config/initializers/better_html.rb @@ -1 +1,5 @@ BetterHtml.config = BetterHtml::Config.new(YAML.safe_load(File.read(Rails.root.join(".better-html.yml")))) + +BetterHtml.configure do |config| + config.template_exclusion_filter = Proc.new { |filename| !filename.start_with?(Rails.root.to_s) } +end