kuhsaft 0.2.legacy2 → 0.2.legacy3
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/kuhsaft/pages_controller.rb +18 -4
- data/config/routes.rb +1 -1
- data/lib/kuhsaft/version.rb +1 -1
- metadata +3 -3
@@ -1,11 +1,25 @@
|
|
1
1
|
module Kuhsaft
|
2
2
|
class PagesController < ApplicationController
|
3
|
-
|
3
|
+
|
4
4
|
respond_to :html
|
5
|
-
|
5
|
+
before_filter :complete_url
|
6
|
+
|
6
7
|
def show
|
7
8
|
@page = Kuhsaft::Page.find_by_url(params[:url])
|
8
|
-
|
9
|
+
if @page.present?
|
10
|
+
respond_with @page
|
11
|
+
else
|
12
|
+
if respond_to?(:handle_404)
|
13
|
+
handle_404
|
14
|
+
else
|
15
|
+
raise ActionController::RoutingError.new('Not Found')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
def complete_url
|
22
|
+
params[:url] = "#{params[:locale]}/#{params[:url]}" if params[:url].present? && params[:locale].present?
|
9
23
|
end
|
10
24
|
end
|
11
|
-
end
|
25
|
+
end
|
data/config/routes.rb
CHANGED
data/lib/kuhsaft/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuhsaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 531949265
|
5
5
|
prerelease: 4
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
9
|
- legacy
|
10
|
-
-
|
11
|
-
version: 0.2.
|
10
|
+
- 3
|
11
|
+
version: 0.2.legacy3
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- "Immanuel H\xC3\xA4ussermann"
|