[Nitro] param handling

Jonathan Buch john at oxyliquit.de
Wed Oct 25 09:33:33 EDT 2006


> Perhaps we could keep the current behaviour (the request.params hash
> is populated) but if the method signature defines a hash last argument
> like this:
> def my_action(oid, val, params = {})
> end
> this could be populated with the request parameters.
> what do you think?

How would you accomplish that with ruby while not using ParseTree to
check for the exact type of the last argument?

def my_action(oid, val, params = {})
ann :my_action, :param_populate => true

Or something similar might work?

But I see no real advantage of using `params` instead of
`request.params` ... (Or request['param'] for that matter.)


Feel the love

More information about the Nitro-general mailing list