How to disable params parsing ?

Hi,

I'm writing a service that receives XML posted data. By default action_controller/params_parser.rb seems to try to parse the whole thing to translate that into the params hash.

Is there a simple way to disable this parsing so that I can just store the data on the disk without any check to occur ?

One suggestion is to use Metal:

http://stackoverflow.com/questions/1627307/disabled-custom-paramsparser-per-action

But maybe there is a more simple way (like some kind of configuration, :params_parse => false or something ?)

any idea?

cheers,

Thibaut

Bumping this up - anyone knows how to disable params parsing ?

-- Thibaut

Bumping this up - anyone knows how to disable params parsing ?

If you can somehow convince rails that the format it is receiving (perhaps via fiddling with routes?) isn't a format it knows how to parse then it won't parse it.

Fred

If you can somehow convince rails that the format it is receiving (perhaps via fiddling with routes?) isn't a format it knows how to parse then it won't parse it.

I've been reading about that somewhere but at the end the guy didn't manage to achieve the goal.

Finally I used Rails Metal and it works :slight_smile:

best,

Thibaut

> If you can somehow convince rails that the format it is receiving > (perhaps via fiddling with routes?) isn't a format it knows how to > parse then it won't parse it.

I've been reading about that somewhere but at the end the guy didn't manage to achieve the goal.

Yeah, it looks like that might not work any more - it's the content type that you'd have to mess with.

If you'll never need to parse xml requests anywhere you could set the relevant entry in ActionController::Base.param_parsers to nil

Fred

If you’ll never need to parse xml requests anywhere you could set the

relevant entry in ActionController::Base.param_parsers to nil

thanks for the hint - it the application grows, I’ll definitely try that :slight_smile:

cheers,

– Thibaut