Sha256: 2500d34940f992d80f119208b11bd1a6bf02ee6a34a581555a4c2d23fa96c404

Contents?: true

Size: 429 Bytes

Versions: 1

Compression:

Stored size: 429 Bytes

Contents

module Trestle
  module Controller
    module Turbo
      extend ActiveSupport::Concern

      included do
        etag { :frame if turbo_frame_request? }
        helper_method :turbo_frame_request?, :turbo_frame_request_id
      end

    private
      def turbo_frame_request?
        turbo_frame_request_id.present?
      end

      def turbo_frame_request_id
        request.headers["Turbo-Frame"]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trestle-0.10.0.pre app/controllers/concerns/trestle/controller/turbo.rb