Class: PagesController
Instance Method Summary
collapse
caches_page_with_cache_marker, #raise_not_found!
Instance Method Details
#check_ip ⇒ Object
23
24
25
|
# File 'app/controllers/pages_controller.rb', line 23
def check_ip
render json: request.location.try(:data).try(:as_json)
end
|
#not_found_sample ⇒ Object
15
16
17
|
# File 'app/controllers/pages_controller.rb', line 15
def not_found_sample
render_404
end
|
#service_unavailable ⇒ Object
19
20
21
|
# File 'app/controllers/pages_controller.rb', line 19
def service_unavailable
render_cached_page(503)
end
|
#show ⇒ Object
8
9
10
11
12
13
|
# File 'app/controllers/pages_controller.rb', line 8
def show
template = "pages/#{@structure.slug.gsub(/[^a-z]/, '_')}"
template = 'pages/show' unless lookup_context.exists?(template)
render template: template
end
|