Exception: Mack::Errors::UndefinedRoute

Inherits:
StandardError
  • Object
show all
Defined in:
lib/mack/errors/errors.rb

Overview

Raised when a route that matches the pattern of the incoming route AND the method of the request can’t be found. It’s important to note that BOTH the PATTERN and the HTTP METHOD HAVE to match for a route to be found!

Instance Method Summary collapse

Constructor Details

#initialize(req) ⇒ UndefinedRoute

Takes a request object.



58
59
60
61
62
63
64
# File 'lib/mack/errors/errors.rb', line 58

def initialize(req)
  if req.is_a?(Mack::Request)
    super("#{req.path_info}; #{req.request_method}")
  else
    super(req)
  end
end