Skip to content

Commit

Permalink
Disable BetterHtml on Rails error pages
Browse files Browse the repository at this point in the history
It prevents the web console from being rendered and just shows the
default uninformative error screen.

More info here: Shopify/better-html#50
  • Loading branch information
peteryates authored and ethax-ross committed Oct 20, 2021
1 parent e144077 commit e62b79b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/initializers/better_html.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e62b79b

Please sign in to comment.