From e18c56f2092e6b44504673f14b189397c1aefd8b Mon Sep 17 00:00:00 2001 From: bogdanRada Date: Thu, 5 Dec 2013 09:30:23 +0200 Subject: [PATCH] refactoring --- lib/washout_builder.rb | 1 + lib/washout_builder/dispatcher.rb | 10 ---------- lib/washout_builder/version.rb | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/lib/washout_builder.rb b/lib/washout_builder.rb index 7ccc86b..e033fea 100644 --- a/lib/washout_builder.rb +++ b/lib/washout_builder.rb @@ -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 diff --git a/lib/washout_builder/dispatcher.rb b/lib/washout_builder/dispatcher.rb index d670f28..44e3082 100644 --- a/lib/washout_builder/dispatcher.rb +++ b/lib/washout_builder/dispatcher.rb @@ -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 \ No newline at end of file diff --git a/lib/washout_builder/version.rb b/lib/washout_builder/version.rb index d544980..e596cff 100644 --- a/lib/washout_builder/version.rb +++ b/lib/washout_builder/version.rb @@ -1,3 +1,3 @@ module WashoutBuilder - VERSION = "0.6.0" + VERSION = "0.6.1" end