caboose-cms 0.5.51 → 0.5.52

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
- MDI4ZTk0NDNhMmZiNTczNThiMWU1MTk4ODIxYTQzZGZmZWM1ZWY0Yg==
4
+ NzA0MzEzM2FiOGMxODNiOTVmNTE1YmZlMjc1MTZhNzM5YTRjMzM0OA==
5
5
  data.tar.gz: !binary |-
6
- NzZmYmI1ZDI4NWQyMWQ0YjEwMDY0ZGJjZmQ5YTJmZjE3MjkwOTA3YQ==
6
+ ZjdhMGE0YjI0NTEzOTYyMTM5MTc0MDFjN2ZlNzc2NWI5YzQwMzkzNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjY0MDMxMzI1Y2NmMTllMmI0NWU4NmRjOWMzYzg2ODU1NjlmZjgyNTllY2Q4
10
- ZWYxMjdjNDNiZjk1YjZhNDkzOWIzODM2MWQ1YjRjYzZmN2ZjNDM1YjZhZDBm
11
- N2FiYjBkNjMwZWM4MjIxMTM4ZTIzZGM4ZWUxZjFiYzgzYWNhM2Y=
9
+ N2M4YzIzMDc0NzYxYzA5ZTQwMGI4YjdlYmY1ZTNiYzFkZGNjNzgzODZkNzlh
10
+ YWM3ZjcwYTU5MzBiNjc3YjY0NTkxZmIwZjYyMDg2OGY3ZjcwMzVmM2Y0ZTU4
11
+ YTI2ZGE1YjhiNWMxN2JmYzhmZDgxMjVjNDNiNDY5NzcxNjYzOTc=
12
12
  data.tar.gz: !binary |-
13
- ZDI2ZDJlY2JhM2VjNTFiNTlmNTg5MjMwMzYwNzRmNTk0ZGI2NmMzZTZjMDcy
14
- ZDJmM2Y1YmRlM2ZiZDVmNTA4YWI4ZDg0YWNiNzUyOTU4M2FiZjVlYjEzNWJh
15
- M2E3YjI0NWY2ZDQ0MzE0MjdjYTE0ZGQ3ZWU4OTQwNmMwOTNmZTQ=
13
+ NDc4Yzc1Mzg1NTRhYjBmMjExOWQ2MjlmNGI5MDY2NDVmYTVlYjAxMWJmYjdm
14
+ MmRkMWRlNzE3MjhkYWJkZGMyYmZiNDBhNDRmNzRiNzY4YmY1ZDEzNTE1MmRi
15
+ NDIwODJkYzA1OTM3NzhjZTgwNmZkZjQ5ZDVkOTYwZWRjNDliZTA=
@@ -8,6 +8,11 @@ module Caboose
8
8
  # GET /admin/categories
9
9
  def admin_index
10
10
  return unless user_is_allowed('categories', 'view')
11
+
12
+ @top_cat = Caboose::Category.where("site_id = ? and parent_id is null", @site.id).first
13
+ if @top_cat.nil?
14
+ @top_cat = Caboose::Category.create(:site_id => @site.id, :name => 'All Products', :url => '/')
15
+ end
11
16
  render :layout => 'caboose/admin'
12
17
  end
13
18
 
@@ -18,7 +18,7 @@ end
18
18
 
19
19
  <h1>Categories</h1>
20
20
  <a href='/admin/categories/new'>New Category</a>
21
- <%= category_list(top_cat) %>
21
+ <%= category_list(@top_cat) %>
22
22
 
23
23
  <% content_for :caboose_js do %>
24
24
  <script type='text/javascript'>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.51'
2
+ VERSION = '0.5.52'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.51
4
+ version: 0.5.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry