caboose-cms 0.5.217 → 0.5.218
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/models/caboose/order.rb +4 -12
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OTU2M2U3MjdlNWU4ZjgzNjViY2Y5ZmZmMDM0YmYyMjkwMmQxYTE4Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDZjMzdiMTFhNDY0MTY2OGNmMmQ2NWQ2NGNiZmQwMzYxM2YyZDYwZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjFiMjM3NzRkYTRiNGQ5NjhlMDY2OTE0NmQ4NGYyODZiMDFlNDcxMjEyMmU0
|
10
|
+
NTcxYzcyODdmYmRiNmFkYTc4NjcxOTBhOTE5MzZhN2EzM2EzNjhjZTVhYjVi
|
11
|
+
OTYzMjljMjljZmZiOTNkOTE3OTE0ODBhZTcxYWQwMmU5Y2IxYzc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGE1NWI4ZmM0YTVhYTkwNDUwZjg0YTFkZjljYmEyYzgwOTliMGQxM2YzOTcy
|
14
|
+
Y2M1YzExNjc0NTVjMzY5Y2EzMmJjNWYwOGFkYTJiMDc0N2MwMThjMmI3Zjgz
|
15
|
+
ZTMzODFhNWE3M2MyYTEwZWFiZTZjMzI0YjA2NjJmYzMzZDM3YjM=
|
data/app/models/caboose/order.rb
CHANGED
@@ -93,24 +93,16 @@ module Caboose
|
|
93
93
|
self.total = 0.00 if self.total.nil?
|
94
94
|
end
|
95
95
|
|
96
|
-
def decrement_quantities
|
97
|
-
return false if self.decremented
|
98
|
-
|
96
|
+
def decrement_quantities
|
99
97
|
self.line_items.each do |line_item|
|
100
98
|
line_item.variant.update_attribute(:quantity, line_item.variant.quantity_in_stock - line_item.quantity)
|
101
|
-
end
|
102
|
-
|
103
|
-
self.update_attribute(:decremented, true)
|
99
|
+
end
|
104
100
|
end
|
105
101
|
|
106
|
-
def increment_quantities
|
107
|
-
return false if !self.decremented
|
108
|
-
|
102
|
+
def increment_quantities
|
109
103
|
self.line_items.each do |line_item|
|
110
104
|
line_item.variant.update_attribute(:quantity, line_item.variant.quantity_in_stock - line_item.quantity)
|
111
|
-
end
|
112
|
-
|
113
|
-
self.update_attribute(:decremented, false)
|
105
|
+
end
|
114
106
|
end
|
115
107
|
|
116
108
|
def resend_confirmation
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.218
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|