Don't define a controller action called #process

Updated . Posted . Visible to the public. Repeats.

Remember that your controller actions share the same method space with private methods defined in ActionController::Base. If your controller behaves in super-weird ways, check that you don't overwrite some internal method with a controller action.

Examples for internal methods:

  • #process
  • #process_action

Debugging

If you accidentally did overwrite some internal method, you may come across an ArgumentError with the message wrong number of arguments (given 1, expected 0) raised at the line your controller action is defined at. Controller actions don't take any arguments, but some middleware trying to call the internal method may pass one or more arguments.

Henning Koch
Last edit
Bruno Sedler
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-05-17 14:40)