effective_orders 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69ff7ff6e5414d61ae7a6fc8982f4975917e72ac
4
- data.tar.gz: d7dc79b1ccba44c64636c436ee4adc58bc0b6253
3
+ metadata.gz: 4c35da0558303f282bbfbfcb20c376fa2c2d5a31
4
+ data.tar.gz: 69dad29645d72609176efe6efc6895ecee34ed75
5
5
  SHA512:
6
- metadata.gz: 2a8641f98c31e8eaf05efc5d3ec699cd68a6ad1c4fb429349d45303c685958848e0e1fb3b1a402e658b35a42e86945535a791f2e3641d3c4aadc8074efb921c9
7
- data.tar.gz: 2ed81e8f55fbaa86af4428f89598a189da0abf147bbf4233098383d5cfc080270ccf4440d7f5ded06a27ad24bcc9f25d2c0a990fbe0c92e29c1bf979191e5f16
6
+ metadata.gz: f0bc9242bb237594aa22f088063e26b3fdd3065ba8a8ad145465c561eda6143a9952304fbb0da55c1b1ea40545bb5e44ec7b798262e288c457749d3277a1f493
7
+ data.tar.gz: b18ed09bc2179b7f89cca163c162eab5d9fc619d12a3b3cfec915774d84599234dc7458501bedbdb7642f4247537d94146b1f7089504e2e6fa209ac3cc4af45c
@@ -46,6 +46,7 @@ if defined?(EffectiveDatatables)
46
46
  .select('orders.*, users.email AS email')
47
47
  .select("#{query_total} AS total")
48
48
  .select("string_agg(order_items.title, '!!SEP!!') AS order_items")
49
+ .select("#{query_payment_method} AS payment_method")
49
50
 
50
51
  if EffectiveOrders.require_billing_address && defined?(EffectiveAddresses)
51
52
  addresses_tbl = EffectiveAddresses.addresses_table_name
@@ -72,7 +73,7 @@ if defined?(EffectiveDatatables)
72
73
  end
73
74
 
74
75
  def query_payment_method
75
- "SUBSTRING(payment FROM 'card: (\\w{1,2})\\n')"
76
+ "COALESCE(SUBSTRING(payment FROM 'card: (\\w{1,2})\\n'), SUBSTRING(payment FROM 'action: (\\w+)_postback\\n'))"
76
77
  end
77
78
 
78
79
  def search_column(collection, table_column, search_term)
@@ -86,7 +87,7 @@ if defined?(EffectiveDatatables)
86
87
  when 'purchase_state'
87
88
  then search_term == 'abandoned' ? collection.where(purchase_state: nil) : super
88
89
  when 'payment_method'
89
- then collection.having("#{query_payment_method} = ?", search_term)
90
+ then collection.having("#{query_payment_method} LIKE ?", "#{search_term}%")
90
91
  else
91
92
  super
92
93
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.5.4'.freeze
2
+ VERSION = '1.5.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails