Sha256: d41102465f83b878ba8c94ca6d1755792423540296a80ce0719a6289d88b06e0

Contents?: true

Size: 528 Bytes

Versions: 16

Compression:

Stored size: 528 Bytes

Contents

require_dependency "landable/application_controller"

module Landable
  module Public
    class PagesController < ApplicationController
      respond_to :html

      self.responder = Landable::PageRenderResponder

      def show
        respond_with current_snapshot
      end

      private

      def current_page
        @current_page ||= Page.by_path(request.path)
      end

      def current_snapshot
        @current_snapshot ||= current_page.published_revision.try(:snapshot) or Page.missing
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 app/controllers/landable/public/pages_controller.rb
landable-1.12.3 app/controllers/landable/public/pages_controller.rb
landable-1.12.2 app/controllers/landable/public/pages_controller.rb
landable-1.12.1 app/controllers/landable/public/pages_controller.rb
landable-1.11.1 app/controllers/landable/public/pages_controller.rb
landable-1.11.0 app/controllers/landable/public/pages_controller.rb
landable-1.10.0.rc2 app/controllers/landable/public/pages_controller.rb
landable-1.10.0.rc1 app/controllers/landable/public/pages_controller.rb
landable-1.9.2 app/controllers/landable/public/pages_controller.rb
landable-1.9.1 app/controllers/landable/public/pages_controller.rb
landable-1.9.0 app/controllers/landable/public/pages_controller.rb
landable-1.9.0.rc2 app/controllers/landable/public/pages_controller.rb
landable-1.9.0.rc1 app/controllers/landable/public/pages_controller.rb
landable-1.8.0 app/controllers/landable/public/pages_controller.rb
landable-1.7.1.rc1 app/controllers/landable/public/pages_controller.rb
landable-1.7.0 app/controllers/landable/public/pages_controller.rb