Sha256: 8d8a9d1f9f51356a2d4c53ba5f29d02981a0e3497b0adc90acbb32d232e131cf

Contents?: true

Size: 538 Bytes

Versions: 15

Compression:

Stored size: 538 Bytes

Contents

module Kayessess

  # The SectionsController is responsible for providing actions for listing and
  # showing sections of the styleguide
  class SectionsController < Kayessess::ApplicationController
    before_filter :find_node, only: [:show, :example]

    def index
      @tree_root = @styleguide.tree.root
    end

    def show;
    end

    def example
      render layout: 'kayessess/example'
    end

  private

    def find_node
      @node = @styleguide.section(params[:id])

      raise not_found if @node.nil?
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kayessess-0.2.11 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.10 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.9 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.8 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.7 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.5 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.4 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.3 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.2 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.1 app/controllers/kayessess/sections_controller.rb
kayessess-0.2.0 app/controllers/kayessess/sections_controller.rb
kayessess-0.1.6 app/controllers/kayessess/sections_controller.rb
kayessess-0.1.5 app/controllers/kayessess/sections_controller.rb
kayessess-0.1.4 app/controllers/kayessess/sections_controller.rb
kayessess-0.1.3 app/controllers/kayessess/sections_controller.rb