class Closure::ShowExceptions
This is Rack middleware to show Ruby exceptions. It is automatically loaded when using Closure::Middleware
. It works very much like Rack::ShowExceptions but will use the Javascript
console when it can detect the request was for javascript.
If Javascript
detection isn't working because you're not using .js.erb for the extension, add this as the first line of your script:
<% @response.headers['Content-Type'] = 'application/javascript' %>
Public Class Methods
new(app)
click to toggle source
# File lib/closure/show_exceptions.rb, line 81 def initialize(app) @app = Html.new(Javascript.new(app)) end
Public Instance Methods
call(env)
click to toggle source
# File lib/closure/show_exceptions.rb, line 85 def call(env) @app.call(env) end