module PennyWise::Integration::Rails
Public Instance Methods
error_renderer(code)
click to toggle source
# File lib/penny_wise/integrations/rails.rb, line 10 def error_renderer(code) return render PennyWise.configuration.error_template, status: code, layout: PennyWise.configuration.error_layout end
failure_renderer(code)
click to toggle source
# File lib/penny_wise/integrations/rails.rb, line 16 def failure_renderer(code) render status: code, text: PennyWise.configuration.failure_message end
routing_error()
click to toggle source
# File lib/penny_wise/integrations/rails.rb, line 21 def routing_error # Raise traditional Rack-level Rails RoutingError at Application-level instead, # so it `rescue_from` in PennyWise's error handler can catch it instead of Rack's. # Works in conjunction with a catchall route pointed at this method. raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}" end