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.
- data/app/controllers/cms/aliases_controller.rb +7 -7
- data/config/routes.rb +1 -3
- metadata +2 -10
- data/app/controllers/cms/content_categories_controller.rb +0 -9
- data/app/controllers/cms/content_parts_controller.rb +0 -8
- data/app/controllers/content_category_controller.rb +0 -9
- data/app/controllers/content_part_controller.rb +0 -8
@@ -1,18 +1,18 @@
|
|
1
1
|
# dynamically do the permalink -> content_part or content_category routing
|
2
|
-
class Cms::AliasesController <
|
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
|
-
|
10
|
-
|
11
|
-
|
9
|
+
@contentCategory = category
|
10
|
+
@contentParts = @contentCategory.content_parts
|
11
|
+
|
12
|
+
render 'cms/content_categories/show'
|
12
13
|
elsif part
|
13
|
-
|
14
|
-
|
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
|
data/config/routes.rb
CHANGED
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
|
-
-
|
10
|
-
version: 0.2.
|
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"
|