[Nitro] Request#params

Robert Mela rob at robmela.com
Sun Sep 30 22:06:33 EDT 2007


Not sure what the intent is here in request.rb, module Raw, included in 
class Context

   31    def params
   32     if method == :post
   33             @post_params.instance_variable_get("@hash")
   34     else
   35             @get_params.instance_variable_get("@hash")
   36     end
   37    end


@post_params is itself a hash and an instance variable on Context,  and 
@post_params.instance_variable_get( "@hash" ) returns nil.

Anything wrong with doing this instead?

   31    def params
   32        return method == :post ? @post_params : @get_params
   33    end

If that's acceptable I'll add it to the patches I'm preparing.

thx.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rob.vcf
Type: text/x-vcard
Size: 116 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/nitro-general/attachments/20070930/e386b3ff/attachment.vcf 


More information about the Nitro-general mailing list