spree-cms 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,18 +1,18 @@
1
1
  # dynamically do the permalink -> content_part or content_category routing
2
- class Cms::AliasesController < ApplicationController
2
+ class Cms::AliasesController < Spree::BaseController
3
3
  def show
4
4
 
5
5
  category = ContentCategory.find_by_permalink(params[:name])
6
6
  part = ContentPart.find_by_permalink(params[:name])
7
7
 
8
8
  if category
9
- render_component(:controller => "content_category",
10
- :action => "show",
11
- :id => category.id)
9
+ @contentCategory = category
10
+ @contentParts = @contentCategory.content_parts
11
+
12
+ render 'cms/content_categories/show'
12
13
  elsif part
13
- render_component(:controller => "content_part",
14
- :action => "show",
15
- :id => part.id)
14
+ @contentPart = part
15
+ render 'cms/content_parts/show',
16
16
  else
17
17
  render :file => "#{RAILS_ROOT}/public/404.html", :status => :not_found
18
18
  end
@@ -11,8 +11,6 @@ Rails.application.routes.draw do
11
11
  end
12
12
 
13
13
  namespace :cms do
14
- resources :content_part
15
- resources :content_catgory
16
14
  match ':name' => "aliases#show"
17
15
  end
18
- end
16
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree-cms
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 2
9
- - 0
10
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Andreas Happe
@@ -26,7 +25,6 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 187
30
28
  segments:
31
29
  - 0
32
30
  - 40
@@ -55,10 +53,6 @@ files:
55
53
  - app/controllers/admin/content_part_localizations_controller.rb
56
54
  - app/controllers/admin/content_parts_controller.rb
57
55
  - app/controllers/cms/aliases_controller.rb
58
- - app/controllers/cms/content_categories_controller.rb
59
- - app/controllers/cms/content_parts_controller.rb
60
- - app/controllers/content_category_controller.rb
61
- - app/controllers/content_part_controller.rb
62
56
  - app/helpers/cms_helpers.rb
63
57
  - app/models/content_category.rb
64
58
  - app/models/content_category_localization.rb
@@ -335,7 +329,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
335
329
  requirements:
336
330
  - - ">="
337
331
  - !ruby/object:Gem::Version
338
- hash: 57
339
332
  segments:
340
333
  - 1
341
334
  - 8
@@ -346,7 +339,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
346
339
  requirements:
347
340
  - - ">="
348
341
  - !ruby/object:Gem::Version
349
- hash: 3
350
342
  segments:
351
343
  - 0
352
344
  version: "0"
@@ -1,9 +0,0 @@
1
- class Cms::ContentCategoriesController < Spree::BaseController
2
- resource_controller
3
- actions :show, :index
4
-
5
- def show
6
- @contentCategory = ContentCategory.find(params[:id])
7
- @contentParts = @contentCategory.content_parts
8
- end
9
- end
@@ -1,8 +0,0 @@
1
- class Cms::ContentPartsController < Spree::BaseController
2
- resource_controller
3
- actions :show, :index
4
-
5
- def show
6
- @contentPart = ContentPart.find(params[:id])
7
- end
8
- end
@@ -1,9 +0,0 @@
1
- class ContentCategoryController < Spree::BaseController
2
- resource_controller
3
- actions :show, :index
4
-
5
- def show
6
- @contentCategory = ContentCategory.find(params[:id])
7
- @contentParts = @contentCategory.content_parts
8
- end
9
- end
@@ -1,8 +0,0 @@
1
- class ContentPartController < Spree::BaseController
2
- resource_controller
3
- actions :show, :index
4
-
5
- def show
6
- @contentPart = ContentPart.find(params[:id])
7
- end
8
- end