[Rails-core] Re: ParamsParser and request body streams

2009-05-15 Thread Michael Koziarski
> I guess the real patch would allow "ActiveSupport::JSON.decode" to > accept an IO object as well. Then we could just pass that directly in. yeah, ideally both the JSON and XML parsers would accept an IO, and the 'read into a string' logic would live in the implementations which don't support st

[Rails-core] Re: ParamsParser and request body streams

2009-05-15 Thread Joshua Peek
On Fri, May 15, 2009 at 6:59 PM, brianmario wrote: > > The problem is that the ParamsParser reads the entire body into a > string (from what I can tell by the line "body = request.raw_post") > before handing it to the parsing backend. My suggestion is that it > hand the IO object (env['rack.input

[Rails-core] Re: ParamsParser and request body streams

2009-05-15 Thread brianmario
The problem is that the ParamsParser reads the entire body into a string (from what I can tell by the line "body = request.raw_post") before handing it to the parsing backend. My suggestion is that it hand the IO object (env['rack.input'] I assume?) to the parser instead. This way the parser can e

[Rails-core] Re: ParamsParser and request body streams

2009-05-15 Thread Joshua Peek
Check out how the current ParamsParser middleware works. You can use whatever parser to extract the request params in your middleware and Rails will be fooled into using that instead. On Fri, May 15, 2009 at 1:31 PM, brianmario wrote: > > Hey everyone, > I was wondering what the possability was

[Rails-core] Re: ParamsParser and request body streams

2009-05-15 Thread Michael Koziarski
> Comments? This sounds like a great idea to me, without much in the way of downsides. So give it a go and see what breaks. -- Cheers Koz --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" gr

[Rails-core] ParamsParser and request body streams

2009-05-15 Thread brianmario
Hey everyone, I was wondering what the possability was of changing these lines: body = request.raw_post Hash.from_xml(body) or data = ActiveSupport::JSON.decode(body) to instead be handed the env['rack.input'] IO itself? Being as though both calls (from_xml and decode) are handled by rails else

[Rails-core] tracking_attribute_changes and using default checkbox form in the view

2009-05-15 Thread Stephen Bannasch
>It will be available in the next point release we do from the 2.2 >branch (2.2.3) hopefully that will come out relatively soon as there's >a few fixes piled up. > >On Wed, Jan 14, 2009 at 6:22 AM, Antoine wrote: >> >> Thank you Ben for your answer ;-) >> Do you know when the patch will be avai