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 19, 2021
1 parent 66f3329 commit d4720e1
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 d4720e1

Please sign in to comment.