parameter snippets

HTTP parameter named "action" is reserved in Rails

Tagged rails, action, parameter, http, reserved  Languages ruby

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