module Utopia::Controller::Actions

A controller layer which invokes functinality based on the request path. @example

on '*' do |request, path|
        succeed! content: 'Hello World'
end

Public Class Methods

prepended(base) click to toggle source
# File lib/utopia/controller/actions.rb, line 33
def self.prepended(base)
        base.extend(ClassMethods)
end

Public Instance Methods

process!(request, path) click to toggle source

Invoke all matching actions. If no actions match, will call otherwise. If no action gives a response, the request is passed to super.

Calls superclass method
# File lib/utopia/controller/actions.rb, line 165
def process!(request, path)
        catch_response do
                self.class.dispatch(self, request, path)
        end || super
end