activeadmin-selleo-cms 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,12 @@
|
|
1
1
|
module ActiveadminSelleoCms
|
2
2
|
class PagesController < ActiveadminSelleoCms::ApplicationController
|
3
3
|
def show
|
4
|
-
if @page = Page.published.find_by_slug(params[:id])
|
4
|
+
if params[:id] and @page = Page.published.find_by_slug(params[:id])
|
5
5
|
render action: :show, layout: @page.layout
|
6
6
|
elsif params[:id]
|
7
7
|
redirect_to "/#{I18n.locale}"
|
8
8
|
else
|
9
|
-
@page = Page.roots.first
|
9
|
+
@page = Page.roots.reorder("id ASC").first
|
10
10
|
render action: :show, layout: @page.layout
|
11
11
|
end
|
12
12
|
@page.increment!(:views) if @page
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin-selleo-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|