Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/qbwc/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module Controller
def self.included(base)
base.class_eval do
include WashOut::SOAP
skip_before_filter :_parse_soap_parameters, :_authenticate_wsse, :_map_soap_parameters, :only => :qwc
before_filter :get_session, :except => [:qwc, :authenticate, :_generate_wsdl]
after_filter :save_session, :except => [:qwc, :authenticate, :_generate_wsdl, :close_connection, :connection_error]
skip_before_action :_parse_soap_parameters, :_authenticate_wsse, :_map_soap_parameters, raise: false, :only => :qwc
before_action :get_session, :except => [:qwc, :authenticate, :_generate_wsdl]
after_action :save_session, :except => [:qwc, :authenticate, :_generate_wsdl, :close_connection, :connection_error]

# wash_out changed the format of app/views/wash_with_soap/rpc/response.builder in commit
# https://github.com/inossidabile/wash_out/commit/24a77f4a3d874562732c6e8c3a30e8defafea7cb
Expand Down Expand Up @@ -58,7 +58,7 @@ def self.included(base)
def qwc
qwc = <<QWC
<QBWCXML>
<AppName>#{Rails.application.class.parent_name} #{Rails.env} #{@app_name_suffix}</AppName>
<AppName>#{Rails::VERSION::MAJOR >= 6 ? Rails.application.class.module_parent_name : Rails.application.class.parent_name} #{Rails.env} #{@app_name_suffix}</AppName>
<AppID></AppID>
<AppURL>#{QBWC.app_url || (root_url(:protocol => 'https://')+'qbwc/action')}</AppURL>
<AppDescription>Quickbooks integration</AppDescription>
Expand All @@ -70,7 +70,7 @@ def qwc
<Style>Document</Style>
</QBWCXML>
QWC
send_data qwc, :filename => "#{@filename || Rails.application.class.parent_name}.qwc", :content_type => 'application/x-qwc'
send_data qwc, :filename => "#{@filename || Rails::VERSION::MAJOR >= 6 ? Rails.application.class.module_parent_name : Rails.application.class.parent_name}.qwc", :content_type => 'application/x-qwc'
end

class StringArray < WashOut::Type
Expand Down
4 changes: 2 additions & 2 deletions lib/qbwc/qbwc_session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ module QBWC
class QbwcSession < ActiveRecord::Base
before_create :setup

belongs_to :previous_job, class_name: QBWC::QbwcJob, foreign_key: :prev_qbwc_job_id
belongs_to :next_job, class_name: QBWC::QbwcJob, foreign_key: :next_qbwc_job_id
belongs_to :previous_job, class_name: 'QBWC::QbwcJob', foreign_key: :prev_qbwc_job_id, required: false
belongs_to :next_job, class_name: 'QBWC::QbwcJob', foreign_key: :next_qbwc_job_id, required: false

attr_accessor :response
@@before_session_hooks = Set.new
Expand Down