module Turbolinks::XHRHeaders

Private Instance Methods

_compute_redirect_to_location_with_xhr_referer(options) click to toggle source
# File lib/turbolinks.rb, line 10
def _compute_redirect_to_location_with_xhr_referer(options)
  if options == :back && request.headers["X-XHR-Referer"]
    _compute_redirect_to_location_without_xhr_referer(request.headers["X-XHR-Referer"])
  else
    _compute_redirect_to_location_without_xhr_referer(options)
  end
end
set_xhr_current_location() click to toggle source
# File lib/turbolinks.rb, line 18
def set_xhr_current_location
  response.headers['X-XHR-Current-Location'] = request.fullpath
end