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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTBlZjFhNjg5MDI5YmQ2ZTU2ODhkZTAzYTRjODI3NTlhNDE3NGVjNw==
4
+ OTU2M2U3MjdlNWU4ZjgzNjViY2Y5ZmZmMDM0YmYyMjkwMmQxYTE4Nw==
5
5
  data.tar.gz: !binary |-
6
- ODA1YzVmNmRiNWQzOTVjZDhjMTY5YWQwOGQ2NzFkZDdlNmVjYjFhOA==
6
+ MDZjMzdiMTFhNDY0MTY2OGNmMmQ2NWQ2NGNiZmQwMzYxM2YyZDYwZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWYwZGZkNzIzODJiODM3ZDY3YTZmMGM2OTk3MGY4MzlkNTYxMzQ3NzIzN2Ri
10
- NzE5YjU3MzAzZDA2NDRiMTRlNDg4YTc5Y2FjYzkyNjk1MzU0ODYyZjhhOTg1
11
- NWQxMjVkZGFjNGMxYzVkOGVkNDcyYTBmZjBiNTc1MzE0ZmZiNTE=
9
+ ZjFiMjM3NzRkYTRiNGQ5NjhlMDY2OTE0NmQ4NGYyODZiMDFlNDcxMjEyMmU0
10
+ NTcxYzcyODdmYmRiNmFkYTc4NjcxOTBhOTE5MzZhN2EzM2EzNjhjZTVhYjVi
11
+ OTYzMjljMjljZmZiOTNkOTE3OTE0ODBhZTcxYWQwMmU5Y2IxYzc=
12
12
  data.tar.gz: !binary |-
13
- N2RkZjI5NWRmNmJhMDJjZmI0MGZjMDY2NjUyMTZjMzA5YTI5YmMyN2IwZDJj
14
- YjE3ZjA4OTg1NDgyN2Q0YzJhOGZkMGY4NzVjOWU2N2Y0ZjlkZTJhNGIwMTFl
15
- YmNlNTNkNjZkYjU5NDgyNzJmZWY3ZWYzM2FjYzUyOWY5OTc5YTA=
13
+ MGE1NWI4ZmM0YTVhYTkwNDUwZjg0YTFkZjljYmEyYzgwOTliMGQxM2YzOTcy
14
+ Y2M1YzExNjc0NTVjMzY5Y2EzMmJjNWYwOGFkYTJiMDc0N2MwMThjMmI3Zjgz
15
+ ZTMzODFhNWE3M2MyYTEwZWFiZTZjMzI0YjA2NjJmYzMzZDM3YjM=
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.217'
2
+ VERSION = '0.5.218'
3
3
  end
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.217
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-18 00:00:00.000000000 Z
11
+ date: 2015-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg