effective_orders 1.3.2 → 1.3.3

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: 8a3ae1b1bfe46285c18de3ac2cd0c61390b61ff2
4
- data.tar.gz: b68649dfb3abaf5fe2b622486ccd73fa936cf9e8
3
+ metadata.gz: fd20b481dd7d213b559c94f7b4eea3eadca2886d
4
+ data.tar.gz: 02b9e33298ad23bef527771adb46ed6facf8f535
5
5
  SHA512:
6
- metadata.gz: d5bc0e026ef2836d9b313e3a4be35b28121f7bc90755c71852b7aca41dff746867c1c1f9163eb20b1558aa5240d87fdf627e35f30e264536d7b608fc825daa16
7
- data.tar.gz: f70043ddaf98f476cad272d82145a5499586ff50d8fd10a016328dd61e8d8cacf4ddbe7574c798541ff9698a228bcf7c48908bfd8781c33564d4ff611322872e
6
+ metadata.gz: 01c66fb57129fb94a1d8363f770a6eacf48d83827d045acd93f3aa3ac296fec4aa471b109a1433cf61496e1521b32d2949d010b11f9fad4881d768c18f7bb8f3
7
+ data.tar.gz: 4049fd21bd89deb664c2325e7162cbb460e6709fbdacf09a014e09b993cf9ece6d3a9d6bfeb3d516bccc03e270639cc455b2d06a75e83a8565327c1f59e0c481
@@ -28,6 +28,7 @@ module ActsAsPurchasable
28
28
  scope :sold_by, lambda { |user| joins(:order_items).joins(:orders).where(:order_items => {:seller_id => user.try(:id)}).where(:orders => {:purchase_state => EffectiveOrders::PURCHASED}).uniq }
29
29
 
30
30
  scope :not_purchased, -> { where('id NOT IN (?)', purchased.pluck(:id).presence || [0]) }
31
+ scope :not_purchased_by, lambda { |user| where('id NOT IN (?)', purchased_by(user).pluck(:id).presence || [0]) }
31
32
  end
32
33
 
33
34
  module ClassMethods
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '1.3.2'.freeze
2
+ VERSION = '1.3.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect