Calling controllers and actions from the Rails console
script/console
app.get '/posts/1'
app.response
script/console
app.get '/posts/1'
app.response
The “action” and “controller” HTTP parameters are reserved in Rails, so you cannot access them through the params object.
To access them you can do this:
def index
if request.post?
request.POST['action']
else
request.GET['action']
end
end