Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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