Sha256: 4ef3ca9bfc0e5c703991fa8d1c07ad4482311efd70172b535e862c2dde807ed7

Contents?: true

Size: 607 Bytes

Versions: 5

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module Lcms
  module Engine
    class PagesController < Lcms::Engine::ApplicationController
      def show
        @page = Lcms::Engine::Page.find(params[:id])
      end

      def show_slug
        slug = params[:slug].to_s
        @page = Lcms::Engine::Page.find_by(slug: slug)
        render slug if template_exists?(slug, 'pages')
      end

      # NOTE: Temporary disabled
      # def leadership
      #   @leadership_posts = LeadershipPost.all.order_by_name_with_precedence
      # end

      def not_found
        render status: :not_found
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lcms-engine-0.1.4 app/controllers/lcms/engine/pages_controller.rb
lcms-engine-0.1.3 app/controllers/lcms/engine/pages_controller.rb
lcms-engine-0.2.0 app/controllers/lcms/engine/pages_controller.rb
lcms-engine-0.1.2 app/controllers/lcms/engine/pages_controller.rb
lcms-engine-0.1.0 app/controllers/lcms/engine/pages_controller.rb