10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/controllers/postnhost/public/static_pages_controller.rb', line 10
def show
raise ActionController::RoutingError, "Not Found" unless valid_slug?
if page_resolution.present?
apply_public_http_cache(page_resolution.record_id, template: resolve_public_template("static_pages/show"))
return if performed?
load_dynamic_page
return render_public_template("static_pages/show")
end
template = resolved_template
raise ActionController::RoutingError, "Not Found" unless template
apply_public_http_cache(params[:slug], template:)
return if performed?
render template: template
end
|