Sha256: 68fba56f053eefa01703288859e5b85479a09fdf95a7a63b4f155d53c4664be9
Contents?: true
Size: 702 Bytes
Versions: 10
Compression:
Stored size: 702 Bytes
Contents
module Trestle module Controller module Location extend ActiveSupport::Concern included do after_action :set_trestle_location_header end # The X-Trestle-Location header is set to indicate that the remote form has triggered # a new page URL (e.g. new -> show) without demanding a full page refresh. def set_trestle_location_header unless dialog_request? || response.location headers["X-Trestle-Location"] = request.path end end # Do not use Turbolinks for redirects from a dialog request def visit_location_with_turbolinks(location, action) super unless dialog_request? end end end end
Version data entries
10 entries across 10 versions & 1 rubygems