[Nitro] Solved: OgAdminController#save is not the problem....

George Moschovitis george.moschovitis at gmail.com
Fri Nov 2 02:16:38 EDT 2007


Yeap,

I think it is needed for making this work:

def my_action(param1, param2)
end

I am not sure though...

-g.


On Nov 2, 2007 5:45 AM, Trans <transfire at gmail.com> wrote:

>
>
> On Nov 1, 10:52 pm, Robert Mela <r... at robmela.com> wrote:
> > Problem found.   The correct fix for OgAdminController#save is not in
> > OgAdminController.  It's in Cgi#parse_params
> >
> > Before a fix can be implemented there should be a decision as to whether
> > post and get params should be hash or dictionary.
> >
> > Plain old POST request bodies are parsed using Cgi#parse_query_string (
> > sic ) and that returns a Dictonary:
> >
> >   context.post_params = parse_query_string(data)
> >
> > Multipart form data is parsed using Cgi#parse_multipart, which returns a
> > Hash
> >
> >     context.post_params = parse_multipart(context, boundary)
> >
> > ... and which also conveniently contains the comment
> >
> >   #--
> >   # TODO: RECODE THIS CRAP!
> >   #++
> >
> > If a decision is reached that Dictionary is to be used for form data
> > then the following initializations in Context#initialize would need to
> > be changed:
> >
> >     @post_params = {}
> >     @get_params = {}
> >
> > So, having no shame, I'll ask a stupid question:  Why Dictionary for
> > request params?   Also, does using Dictionary for some collection (
> > post/get params ) and Hash for others ( headers) risk being
> > counterintuitive?  I think it's reasonable to think of headers and
> > params as collections, and for a programmer to expect them to expose the
> > same syntax.
>
> Is there a reason for these to maintain order?
>
> T.
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>



-- 
http://me.gr
http://joy.gr
http://cull.gr
http://nitroproject.org
http://phidz.com
http://joyerz.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/nitro-general/attachments/20071102/830ba6d4/attachment.html 


More information about the Nitro-general mailing list