Sha256: 6b7089c3088ff85566ce0003e7335f3d2e1325f5066ec6920fad2599b08ebc64

Contents?: true

Size: 579 Bytes

Versions: 19

Compression:

Stored size: 579 Bytes

Contents

module ActionController
  # When you're using the flash, it's generally used as a conditional on the view.
  # This means the content of the view depends on the flash. Which in turn means
  # that the ETag for a response should be computed with the content of the flash
  # in mind. This does that by including the content of the flash as a component
  # in the ETag that's generated for a response.
  module EtagWithFlash
    extend ActiveSupport::Concern

    include ActionController::ConditionalGet

    included do
      etag { flash unless flash.empty? }
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
actionpack-5.1.7 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.7.rc1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.6.2 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.6.1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.6 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.5 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.5.rc1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.4 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.4.rc1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.3 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.3.rc3 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.3.rc2 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.3.rc1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.2 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.2.rc1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.1 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.0 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.0.rc2 lib/action_controller/metal/etag_with_flash.rb
actionpack-5.1.0.rc1 lib/action_controller/metal/etag_with_flash.rb