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