4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/controllers/pages_controller.rb', line 4
def show
unless @page
if Rails.configuration.consider_all_requests_local
raise ActionController::RoutingError.new('Not Found')
else
logger.error("[Forest][Error] 404 page not found. Looked for path \"#{request.fullpath.force_encoding('utf-8')}\"")
@body_classes ||= []
@body_classes << 'controller--errors action--not_found'
@page_title = '404 - Not Found'
return render 'errors/not_found'
end
end
authorize @page
if @page.redirect.present?
return redirect_to @page.redirect
end
@body_classes << "page--#{@page.slug}"
end
|