Module: Turbo::DriveHelper
- Defined in:
- app/helpers/turbo/drive_helper.rb
Instance Method Summary collapse
-
#turbo_exempts_page_from_cache ⇒ Object
Pages that are more likely than not to be a cache miss can skip turbo cache to avoid visual jitter.
-
#turbo_exempts_page_from_preview ⇒ Object
Specify that a cached version of the page should not be shown as a preview during an application visit.
-
#turbo_page_requires_reload ⇒ Object
Force the page, when loaded by Turbo, to be cause a full page reload.
Instance Method Details
#turbo_exempts_page_from_cache ⇒ Object
Pages that are more likely than not to be a cache miss can skip turbo cache to avoid visual jitter. Cannot be used along with turbo_exempts_page_from_preview
.
15 16 17 |
# File 'app/helpers/turbo/drive_helper.rb', line 15 def turbo_exempts_page_from_cache provide :head, tag.(name: "turbo-cache-control", content: "no-cache") end |
#turbo_exempts_page_from_preview ⇒ Object
Specify that a cached version of the page should not be shown as a preview during an application visit. Cannot be used along with turbo_exempts_page_from_cache
.
21 22 23 |
# File 'app/helpers/turbo/drive_helper.rb', line 21 def turbo_exempts_page_from_preview provide :head, tag.(name: "turbo-cache-control", content: "no-preview") end |
#turbo_page_requires_reload ⇒ Object
Force the page, when loaded by Turbo, to be cause a full page reload.
26 27 28 |
# File 'app/helpers/turbo/drive_helper.rb', line 26 def turbo_page_requires_reload provide :head, tag.(name: "turbo-visit-control", content: "reload") end |