An easy way to call an action in script/console of your Ruby on Rails application is to simply call "app.get" and pass parameters similar to a functional test. You then can get access to the response object with "app.response".

> app.get '/posts/1'
> r = app.response
> r.body
> r.cookies


Call Controller
One thing I love with Ruby codes is that it is clean and simple. Nice call controller script and thanks for sharing.