caboose-cms 0.9.67 → 0.9.68

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: a10980ae1f5e640316c8f251f69ebab779e07d91
4
- data.tar.gz: 64a76b7bf94d88004f2f034c09036acab4cecd4d
3
+ metadata.gz: 3740d98e50a2e6558a49bca0525a37fcf544733c
4
+ data.tar.gz: bbf0b080b4fc7283ad1d1cea14cd2a67e8f8d975
5
5
  SHA512:
6
- metadata.gz: 50424a8fb4fe3a92f9a7b0d2d06fbc1dca609bf0e8825f21923ae3cb6cafc77224dd070294047e37cf0bb99e5fdd85068dba189138be2413246c9a72012a384a
7
- data.tar.gz: 33e56555047ff9ecd839a83bb62b0cc7e27ee012c02329a9aac53c02fd2b8999cd0ffee0bf72f47aa9fc36a003a8a17020a9a67b560211753c3e10f1d0cd2103
6
+ metadata.gz: c66ee2560897a8063e4f105867c42d53e5350619a227c19b85442914288d70b0eb7136260cdf90f0524ab97e5ccb5a2641a1a427a39b93a6d660bfc5d4a44eab
7
+ data.tar.gz: 7cca0d9adc8d03e3aa197ba71c86ca2b37346887a65285f6aa7dcdb9e6fc37d0f22bbcb6336457a3c496cb73df3064332fba94832f2413a000b8f0f425629093
@@ -188,7 +188,7 @@ module Caboose
188
188
  :request => request
189
189
  })
190
190
  render :inline => html
191
- end
191
+ end
192
192
 
193
193
  # @route GET /admin/pages/:page_id/blocks/render
194
194
  # @route GET /admin/posts/:post_id/blocks/render
@@ -381,8 +381,10 @@ module Caboose
381
381
  b1.save
382
382
  b1.create_children
383
383
  bw = b1.child('width')
384
- bw.value = (100.0 / params[:child_count].to_f).to_i.to_s + '%'
385
- bw.save
384
+ if bw
385
+ bw.value = (100.0 / params[:child_count].to_f).to_i.to_s + '%'
386
+ bw.save
387
+ end
386
388
  end
387
389
  end
388
390
 
@@ -218,6 +218,9 @@ module Caboose
218
218
  if v.nil? || v.status == 'Deleted'
219
219
  render :json => { :error => 'One or more of the products you are purchasing are no longer available.' }
220
220
  return
221
+ elsif v.quantity_in_stock < li.quantity
222
+ render :json => { :error => "There are only #{v.quantity_in_stock} of #{v.full_title} available. Please update your quantity." }
223
+ return
221
224
  elsif vl && !vl.qty_within_range(vl.current_value + li.quantity, @invoice)
222
225
  render :json => { :error => 'You have exceeded the limit you are allowed to purchase.' }
223
226
  return
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.67'
2
+ VERSION = '0.9.68'
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.9.67
4
+ version: 0.9.68
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-17 00:00:00.000000000 Z
11
+ date: 2017-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg