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 -- http://www.learnivore.com
Bumping this up - anyone knows how to disable params parsing ? -- Thibaut On Nov 17, 12:27 pm, Thibaut Barrère <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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-paramspars... > > But maybe there is a more simple way (like some kind of > configuration, :params_parse => false or something ?) > > any idea? > > cheers, > > Thibaut > --http://www.learnivore.com-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
On Nov 18, 9:04 am, Thibaut Barrère <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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> -- Thibaut > > On Nov 17, 12:27 pm, Thibaut Barrère <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > 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-paramspars... > > > But maybe there is a more simple way (like some kind of > > configuration, :params_parse => false or something ?) > > > any idea? > > > cheers, > > > Thibaut > > --http://www.learnivore.com-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
> 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 :) best, Thibaut -- http://www.learnivore.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
On Nov 19, 12:47 am, Thibaut Barrère <thibaut.barr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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> Finally I used Rails Metal and it works :) > > best, > > Thibaut > --http://www.learnivore.com-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.
> > 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 :) cheers, -- Thibaut -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=.