[Nitro] Request#params
George Moschovitis
george.moschovitis at gmail.com
Wed Oct 3 04:07:40 EDT 2007
@post_params/@get_params are Dictionary objects. And I needed a version of
them as Hash.
Dictionary is not that compatible with Hash as someone would like.
-g.
On 10/1/07, Robert Mela <rob at robmela.com> wrote:
>
> 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.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>
--
http://gmosx.me.gr
http://phidz.com
http://blog.gmosx.com
http://cull.gr
http://www.joy.gr
http://nitroproject.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071003/85c4dc8b/attachment-0001.html
More information about the Nitro-general
mailing list