Sha256: 7dc37fad304998ed2312b301b003c7b34e10a9a957c126dc67718321bec49c89
Contents?: true
Size: 528 Bytes
Versions: 4
Compression:
Stored size: 528 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 modal_request? || response.location headers["X-Trestle-Location"] = request.path end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems