Sha256: 41a61fcf806e26fec1bdec27dde7ea76b95d81bcaf7548adadcc9725c7254197

Contents?: true

Size: 904 Bytes

Versions: 5

Compression:

Stored size: 904 Bytes

Contents

require_dependency "playbook/application_controller"
require 'yaml'

module Playbook
  class PagesController < ApplicationController
    before_action :set_kit, only: [:kit_show_rails, :kit_show_react]


    def home
    end

    def utilities
    end

    def tokens
    end

    def kits
      params[:type] ||= "rails"
      @type = params[:type]
    end
    def principles
    end

    def fullscreen
      render layout: "layouts/playbook/fullscreen"
    end

    def grid
      render layout: "layouts/playbook/grid"
    end

    def kit_show_rails
      render template: 'playbook/pages/kit_show'
    end
    def kit_show_react
      render template: 'playbook/pages/kit_show'
    end

    private
      def set_kit
        menu =  MENU["kits"]
        unless menu.include?(params[:name])
          redirect_to root_path
        else
          @kit = params[:name]
        end
      end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playbook_ui-2.7.2 app/controllers/playbook/pages_controller.rb
playbook_ui-2.7.1 app/controllers/playbook/pages_controller.rb
playbook_ui-2.7.0 app/controllers/playbook/pages_controller.rb
playbook_ui-2.6.0 app/controllers/playbook/pages_controller.rb
playbook_ui-2.5.0 app/controllers/playbook/pages_controller.rb