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 +4 -4
- data/app/models/concerns/acts_as_purchasable.rb +1 -0
- data/lib/effective_orders/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd20b481dd7d213b559c94f7b4eea3eadca2886d
|
4
|
+
data.tar.gz: 02b9e33298ad23bef527771adb46ed6facf8f535
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|