Skip to content

Commit

Permalink
Rails4-compatible raw body accessor (fixes #118)
Browse files Browse the repository at this point in the history
  • Loading branch information
inossidabile committed Sep 29, 2013
1 parent 31cbe18 commit c6d5a8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/wash_out/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def _parse_soap_parameters
:advanced_typecasting => true,
:convert_tags_to => ( soap_config.snakecase_input ? lambda { |tag| tag.snakecase.to_sym } : lambda { |tag| tag.to_sym } ))

@_params = nori_parser.parse(request.body.read)
@_params = nori_parser.parse(request.raw_post)
references = WashOut::Dispatcher.deep_select(@_params){|k,v| v.is_a?(Hash) && v.has_key?(:@id)}

unless references.blank?
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/wash_out/dispatcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Dispatcher < ApplicationController

def self.mock(text="")
dispatcher = self.new
dispatcher.request = OpenStruct.new(:body => OpenStruct.new(:read => text))
dispatcher.request = OpenStruct.new(:raw_post => text)
dispatcher
end

Expand Down

0 comments on commit c6d5a8c

Please sign in to comment.