op_cart 0.5.2 → 0.5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189c8a856cf652828be2f78169e4bbfbde69c979
|
4
|
+
data.tar.gz: 1ce823a4230ccc8393aabfcdbdc583f9b79bff50
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85c558b86db26f6a03321828d2deeddd5789e021940932bf66b1a0d9e9d4e9f7db235c8710737e86fff3a2ff63c4e264a7b65e8cb61820ba14037780a999c165
|
7
|
+
data.tar.gz: 3bbec259b17a6e3ac46c19573cde8c10c8b0bc610c4a911e378a49abf52e119a77c3406addad883114b5a7740eba0be1152eece9329e56ca58cdcccf532c56e5
|
@@ -73,7 +73,7 @@ module OpCart
|
|
73
73
|
li_quantities_json.each do |plan_id, quantity|
|
74
74
|
plan = Plan.find plan_id
|
75
75
|
@order.line_items << LineItem.new(sellable: plan, quantity: quantity)
|
76
|
-
plan.plan_addons.each do |addon|
|
76
|
+
plan.plan_addons.purchasable.each do |addon|
|
77
77
|
@order.line_items << LineItem.new(sellable: addon.product, quantity: quantity)
|
78
78
|
end
|
79
79
|
end
|
data/app/models/op_cart/order.rb
CHANGED
@@ -30,7 +30,7 @@ module OpCart
|
|
30
30
|
|
31
31
|
def validate_plan_addons_included
|
32
32
|
unless line_items.flat_map do |li|
|
33
|
-
if li.sellable.is_a?(Plan) && (addons = li.sellable.plan_addons).present?
|
33
|
+
if li.sellable.is_a?(Plan) && (addons = li.sellable.plan_addons.purchasable).present?
|
34
34
|
addons.map do |addon|
|
35
35
|
addon_li = line_items.select{|pali| pali.sellable == addon.product }
|
36
36
|
addon_li.count == 1 && addon_li[0].quantity == li.quantity
|
data/app/models/op_cart/plan.rb
CHANGED
data/lib/op_cart/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: op_cart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Boehs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|