Sha256: 9a9323ab9fc1e6ef275102a421a2d8a7a192627ef7c1079dfaae2c6c0506bae4

Contents?: true

Size: 608 Bytes

Versions: 39

Compression:

Stored size: 608 Bytes

Contents

module Turbo::DriveHelper
  # Pages that are more likely than not to be a cache miss can skip turbo cache to avoid visual jitter.
  # Note: This requires a +yield :head+ provision in the application layout.
  #
  # ==== Example
  #
  #   # app/views/application.html.erb
  #   <html><head><%= yield :head %></head><body><%= yield %></html>
  #
  #   # app/views/trays/index.html.erb
  #   <% turbo_exempts_page_from_cache %>
  #   <p>Page that shouldn't be cached by Turbo</p>
  def turbo_exempts_page_from_cache
    provide :head, %(<meta name="turbo-cache-control" content="no-cache">).html_safe
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
turbo-rails-1.1.1 app/helpers/turbo/drive_helper.rb
turbo-rails-1.1.0 app/helpers/turbo/drive_helper.rb
turbo-rails-1.0.1 app/helpers/turbo/drive_helper.rb
turbo-rails-1.0.0 app/helpers/turbo/drive_helper.rb
turbo-rails-0.9.1 app/helpers/turbo/drive_helper.rb
turbo-rails-0.9.0 app/helpers/turbo/drive_helper.rb
turbo-rails-0.8.3 app/helpers/turbo/drive_helper.rb
turbo-rails-0.8.2 app/helpers/turbo/drive_helper.rb
turbo-rails-0.8.1 app/helpers/turbo/drive_helper.rb
turbo-rails-0.8.0 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.15 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.14 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.13 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.12 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.11 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.10 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.9 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.8 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.7 app/helpers/turbo/drive_helper.rb
turbo-rails-0.7.6 app/helpers/turbo/drive_helper.rb