Sha256: 7d7187d9a916dab69ea862c3d2f42a19d3f553387716d1c30c047909a396052e
Contents?: true
Size: 459 Bytes
Versions: 8
Compression:
Stored size: 459 Bytes
Contents
require_dependency "jobshop/application_controller" module Jobshop class PagesController < ApplicationController def show page = valid_page? ? [ template: current_page ] : [ file: "public/404.html", status: :not_found ] render(*page) end private def valid_page? lookup_context.template_exists?(current_page) end def current_page "jobshop/pages/#{params[:page]}" end end end
Version data entries
8 entries across 8 versions & 1 rubygems