Skip to content

Instantly share code, notes, and snippets.

@chris
Created November 19, 2008 23:38
Show Gist options
  • Save chris/26822 to your computer and use it in GitHub Desktop.
Save chris/26822 to your computer and use it in GitHub Desktop.
Use script/runner to execute a route/controller action
#!script/runner
# Use script/runner to execute a route/controller action - delete this line in real life, it's just here to help me know which gist this is.
require 'action_controller/integration'
session = ActionController::Integration::Session.new
session.host = 'www.yourdomain.com'
session.get_via_redirect '/controller/action'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment