docbrown/app/controllers/shell_controller.rb
Ben Halpern 73125c0795
Reduce service worker functionality to minimal offline page (#12834)
* Reduce service worker functionality to minimal offline page

* Update docs for service workers

* Add comment to fix test

* Include incrementable static cache

* Add TODO comments about removal

* Fix trailing whitespace
2021-03-01 19:29:26 -05:00

19 lines
570 B
Ruby

class ShellController < ApplicationController
# TODO: Remove these "ShellController", because they are for service worker functionality we no longer need.
# We are keeping these around mid-March 2021 because previously-installed service workers may still expect them.
before_action :set_cache_control_headers, only: %i[top bottom]
layout false
def top
@shell = true
set_surrogate_key_header "shell-top"
render partial: "top"
end
def bottom
@shell = true
set_surrogate_key_header "shell-bottom"
render partial: "bottom"
end
end