Sha256: 034862f7e0a7ea4525f6e46e9bc496867cbfeed4685a7786ac19c6603921c1ce

Contents?: true

Size: 411 Bytes

Versions: 30

Compression:

Stored size: 411 Bytes

Contents

# Patch BetterErrors::Middleware to render HTML for Inertia requests
#
# Original source:
# https://github.com/BetterErrors/better_errors/blob/v2.5.1/lib/better_errors/middleware.rb
#

if defined?(BetterErrors)
  BetterErrors::Middleware.class_eval do
    prepend(InertiaBetterErrors = Module.new do
      def text?(env)
        return false if env["HTTP_X_INERTIA"]

        super
      end
    end)
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
inertia_rails-3.4.0 lib/patches/better_errors.rb
inertia_rails-3.3.0 lib/patches/better_errors.rb
inertiax_rails-2.0.0 lib/patches/better_errors.rb
inertia_rails-3.2.0 lib/patches/better_errors.rb
inertia_rails-3.1.4 lib/patches/better_errors.rb
inertia_rails-3.1.3 lib/patches/better_errors.rb
inertia_rails-3.1.2 lib/patches/better_errors.rb
inertia_rails-3.1.1 lib/patches/better_errors.rb
inertia_rails-3.1.0 lib/patches/better_errors.rb
inertia_rails-3.0.0 lib/patches/better_errors.rb
inertia_rails-2.0.1 lib/patches/better_errors.rb
inertia_rails-2.0.0 lib/patches/better_errors.rb
inertia_rails-1.12.1 lib/patches/better_errors.rb
inertia_rails-1.12.0 lib/patches/better_errors.rb
inertia_rails-1.11.1 lib/patches/better_errors.rb
inertia_rails-1.11.0 lib/patches/better_errors.rb
inertia_rails-1.10.0 lib/patches/better_errors.rb
inertia_rails-1.9.2 lib/patches/better_errors.rb
inertia_rails-1.9.1 lib/patches/better_errors.rb
inertia_rails-1.9.0 lib/patches/better_errors.rb