Sha256: cab767e79f15588dc57232c44b16b2b17c895c172d782c85ced10e34e08ba355

Contents?: true

Size: 343 Bytes

Versions: 1

Compression:

Stored size: 343 Bytes

Contents

module DocumentationSupport
  extend ActiveSupport::Concern

  def docs
    target = params[:page].presence || "index"
    all_paths = ([Rails.root.to_s] + `bundle show --paths`.lines.map(&:chomp))
    @path = all_paths.map { |path| path + "/docs/#{target}.md" }.detect { |path| File.exists?(path) }
    render :docs, layout: "docs"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bullet_train-1.1.9 app/controllers/concerns/documentation_support.rb