module Turbolinks::Redirection - turbolinks-2.3.0 Documentation

# module Turbolinks::Redirection

Provides a means of using Turbolinks to perform redirects. The server will respond with a JavaScript call to Turbolinks.visit(url).

### Public Instance Methods

redirect_via_turbolinks_to(url = {}, response_status = {}) click to toggle source

    # File lib/turbolinks/redirection.rb, line 7
    def redirect_via_turbolinks_to(url = {}, response_status = {})
      redirect_to(url, response_status)

      self.status           = 200
      self.response_body    = "Turbolinks.visit('#{location}');"
      response.content_type = Mime::JS
    end