Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@surendrakonna
Created May 1, 2020 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save surendrakonna/2565d5d6ab34f9d4d3c03fd67ca415a2 to your computer and use it in GitHub Desktop.
Save surendrakonna/2565d5d6ab34f9d4d3c03fd67ca415a2 to your computer and use it in GitHub Desktop.
Fetch API documentation
class Api::DocsController < ApplicationController
def index
@html = Aws::S3::Object.new(ENV['API_DOCS_BUCKET'], ENV['API_DOCS_FILE_NAME']).get.body.string
render html: @html.html_safe, content_type: "text/html"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment