The First Commandment of Parameters June 3rd, 2008
def transform_params(params)
params.delete(:action)
params.delete(:controller)
# Other code, and then...
params
end
It took two hours before I realized those missing parameters weren't Rails' fault. Repeat after me:
"Parameters are passed by reference. Thou Shalt not modify without warning."
If you're going trash your gifts, try "transform_params!". Destructive methods should end in an exclamation points.