Gotcha: Defining a controller action called 'process'
Early in the morning on #rubyonrails, someone came into channel asking for help. He said that, inexplicably, on controller out of his several controllers stopped functioning. When asked for a log, he gave this pastie.
This is very puzzling. I even looked at the code around line 330 in ActionController:base
327 class << self
328 # Factory for the standard create, process loop where the controller is discarded after processing.
329 def process(request, response) #:nodoc:
330 new.process(request, response)
331 end
When asked about what his controller looked like, he gave this pastie.
Can you spot the error?
The Gotcha
As commented in ActionController::base, a new instance of the controller is generated and the method process is called. Unfortunately, all actions are also method definitions. By attempting to define an action called 'process', it overwrote the original process. That explained the error with the "Wrong number of arguments."
The Judgment
Don't name your action 'process'. And more importantly, dig into the code when you get weird errors like this.
-Hosh