Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanRada committed Dec 5, 2013
1 parent f546ec4 commit e18c56f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions lib/washout_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def wash_out(controller_name, options={})

Mime::Type.register "application/soap+xml", :soap
ActiveRecord::Base.send :extend, WashOut::Model if defined?(ActiveRecord)
WashOut::Dispatcher::SOAPError.send :include, ActiveModel::MassAssignmentSecurity

WashOut::SOAP::ClassMethods.class_eval do
alias_method :original_soap_action, :soap_action
Expand Down
10 changes: 0 additions & 10 deletions lib/washout_builder/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,7 @@ def self.included(controller)
:_generate_wsdl, :_generate_doc,:_invalid_action ]
controller.send :before_filter, :_map_soap_parameters, :except => [
:_generate_wsdl,:_generate_doc, :_invalid_action ]
controller.send :around_filter, :_catch_soap_faults
end

def _catch_soap_faults
yield
rescue => exception
if exception.class <= WashOut::Dispatcher::SOAPError
WashOut::Dispatcher.send(:render_soap_error,exception.message, exception.code)
else
raise exception
end
end
end
end
2 changes: 1 addition & 1 deletion lib/washout_builder/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module WashoutBuilder
VERSION = "0.6.0"
VERSION = "0.6.1"
end

0 comments on commit e18c56f

Please sign in to comment.