Sha256: 30e37e40ecacf3211bb13d1e2b4fc0f9a774701743a5b538d204c84a60e9f2b9
Contents?: true
Size: 523 Bytes
Versions: 104
Compression:
Stored size: 523 Bytes
Contents
module DocumentationSupport extend ActiveSupport::Concern BULLET_TRAIN_BASE_PATH = `bundle show bullet_train`.chomp 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) } @path = "#{BULLET_TRAIN_BASE_PATH}/docs/#{target}.md" render :docs, layout: "docs" end end
Version data entries
104 entries across 104 versions & 1 rubygems