Class: Papercat::PagesController

Inherits:
ApplicationController show all
Includes:
TemplateResolver
Defined in:
app/controllers/papercat/pages_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#admin

Instance Method Details

#showObject



7
8
9
10
11
# File 'app/controllers/papercat/pages_controller.rb', line 7

def show
  @page = Page.at(params[:path]) || Page.get(default: true).first
  redirect_to '/404' and return unless @page
  render layout: 'papercat/page'
end