shop_bunny 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shop_bunny/cart_module.rb +2 -0
- metadata +3 -3
@@ -167,6 +167,8 @@ module ShopBunny
|
|
167
167
|
errors.add(:coupon_code, "is unknown")
|
168
168
|
elsif coupon.expired?
|
169
169
|
errors.add(:coupon_code, "is expired")
|
170
|
+
elsif coupon.max_uses && coupon.max_uses < coupon.coupon_uses.count
|
171
|
+
errors.add(:coupon_code, "is overused")
|
170
172
|
end
|
171
173
|
}
|
172
174
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shop_bunny
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 57
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 8
|
9
|
-
-
|
10
|
-
version: 0.8.
|
9
|
+
- 3
|
10
|
+
version: 0.8.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- kopfmaschine.com
|