class Turbolinks::Handler
- Turbolinks::Handler
- Reference
- Object
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
- HTTP::Handler
Defined in:
Instance Method Summary
-
#call(context : HTTP::Server::Context)
Executes the middleware.
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.