Skip to content

Instantly share code, notes, and snippets.

@nowlinuxing
Created September 4, 2013 10:23
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nowlinuxing/6435240 to your computer and use it in GitHub Desktop.
Save nowlinuxing/6435240 to your computer and use it in GitHub Desktop.
execute Controller#action via rails runner with user authentication (devise)
rails runner "ApplicationController.allow_forgery_protection = false; s = ActionDispatch::Integration::Session.new(Rails.application); s.post('/login', user: {login: 'admin', password: 'password'}); s.get('/my'); puts s.response.body"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment