Sha256: 0fcf83533182ca1bb358137905f986b3e1d25def1c4e4604772b3d7054585c94

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

module Styleguides

  class StyleguidesController < ApplicationController

    unloadable

    def show
      @styleguides = styleguides
    end

    private

    def styleguides
      all_styleguide_partials = ActionController::Base.view_paths.map do |view_path|
        styleguide_path = File.join(view_path.to_s, 'styleguides')
        if File.exists?(styleguide_path)
          Dir.glob(styleguide_path + '/_*.*')
        else
          nil
        end
      end
      all_styleguide_partials.flatten.compact
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
styleguides-0.1 app/controllers/styleguides/styleguides_controller.rb