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 committed Oct 18, 2021
1 parent 75a8fd3 commit edcd78c
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 edcd78c

Please sign in to comment.