Skip to content

Instantly share code, notes, and snippets.

@ragaskar
Created May 21, 2014 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ragaskar/3ec13eea2bdce1f07ad3 to your computer and use it in GitHub Desktop.
Save ragaskar/3ec13eea2bdce1f07ad3 to your computer and use it in GitHub Desktop.
Getting Rails HTML from Controllers (without instantiation) programmatically in a rake task
session = ActionDispatch::Integration::Session.new(Rails.application)
session.get('/some/url/your/app/has')
body = session.response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment