Sha256: 93e5f93999c51f84809e94e29815f356b6244be956a08c132d94f8a809010af9

Contents?: true

Size: 342 Bytes

Versions: 8

Compression:

Stored size: 342 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.exist?(path) }
    render :docs, layout: "docs"
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bullet_train-1.2.6 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.5 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.4 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.3 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.2 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.1 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.0 app/controllers/concerns/documentation_support.rb
bullet_train-1.1.10 app/controllers/concerns/documentation_support.rb