Call controller action from script console in rails app
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.cookiesLabels: code, ruby on rails

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home