class Turbolinks::Handler

Overview

A handler that handles form submission and redirection for Turbolinks enabled frontends. It does nothing if the frontend is not using Turbolinks, so it can safely be used as HTTP middleware for any application.

Use like you would use any HTTP middleware:

require "http/server"
require "turbolinks"

HTTP::Server.new("127.0.0.1", 3000, [
  Turbolinks::Handler.new,
]).listen

Included Modules

Defined in:

Instance Method Summary

Instance Method Detail

def call(context : HTTP::Server::Context) #

Executes the middleware. This function is called by the HTTP server after you've registered it as middleware, so you won't need to use this function directly.