Sha256: a3ff2a338fa5ddfceb32e2ec06f94fde704e928f0cd5842cc7c9619ee26d5045

Contents?: true

Size: 589 Bytes

Versions: 2

Compression:

Stored size: 589 Bytes

Contents

module Svicss

  class StyleguidesController < ApplicationController

    unloadable

    def show
      @styleguides = styleguides
      render :layout => "svicss" if params[:flutie] == "true"
    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

2 entries across 2 versions & 1 rubygems

Version Path
svicss-1.0.5 app/controllers/svicss/styleguides_controller.rb
svicss-1.0.4 app/controllers/svicss/styleguides_controller.rb