Sha256: 426028d8696bd228efb85b92e34d82ecf44ba40a65b606eed5b92a0ce85773a3

Contents?: true

Size: 524 Bytes

Versions: 34

Compression:

Stored size: 524 Bytes

Contents

module DocumentationSupport
  extend ActiveSupport::Concern

  def docs
    target = params[:page].presence || "index"

    # TODO For some reason this didn't work on Heroku.
    # 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) }

    # TODO Trying to just brute force this for now.
    @path = `bundle show bullet_train`.chomp + "/docs/#{target}.md"

    render :docs, layout: "docs"
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
bullet_train-1.3.12 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.11 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.10 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.9 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.8 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.7 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.6 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.5 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.4 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.3 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.2 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.1 app/controllers/concerns/documentation_support.rb
bullet_train-1.3.0 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.27 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.26 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.25 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.24 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.23 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.22 app/controllers/concerns/documentation_support.rb
bullet_train-1.2.21 app/controllers/concerns/documentation_support.rb