  Snippets has posted 5883 posts at DZone. View Full User
Profile  Firing A Controller's Action From The Console    •
submit to reddit  ruby script/console  irb> require
'action_controller/test_process' irb> require 'application' irb>
require 'site_controller' irb> request = irb> response = irb>
request.env['REQUEST_METHOD'] = 'GET' irb> request.action =
"late_employee" irb> InfoController.process(request,response)
Basically, it's like getting inside of a TestUnit method, but
you have to do the dirty work yourself.       Ruslan Voloshin
replied on Fri, 2007/06/22 - 2:06am  app.get
'/info/late_employee' response = app.response response.body This
helped me thanks  Snippets Manager replied on Thu, 2008/12/11 -
10:10am  try: app.get '/info/late_employee' response =
app.response  Snippets Manager replied on Sat, 2007/09/15 -
4:15pm  For something simple like this you can also use (from
./script/console): app.get '/info/late_employee' But I haven't
been able to get at the response object with that yet, so this
was