Sha256: bf76e2c10f5899ab30a57cf4a0f9b195a0b2ccf33c5c3da10854c3872208f974

Contents?: true

Size: 392 Bytes

Versions: 16

Compression:

Stored size: 392 Bytes

Contents

# frozen_string_literal: true

module Maglev
  module Api
    class SitesController < ::Maglev::ApiController
      def show
        if (@site = maglev_site).present?
          @home_page_id = maglev_page_collection.home.pick(:id)
        else
          head :not_found
        end
      end

      private

      def maglev_page_collection
        ::Maglev::Page
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
maglevcms-1.7.3 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.7.2 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.7.1 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.7.0 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.6.1 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.6.0 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.5.1 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.4.0 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.3.0 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.2.2 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.2.1 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.2.0 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.1.7 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.1.6 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.1.5 app/controllers/maglev/api/sites_controller.rb
maglevcms-1.1.4 app/controllers/maglev/api/sites_controller.rb