cat_router 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cat_router/instance_methods.rb +6 -2
- data/lib/cat_router/version.rb +1 -1
- metadata +3 -3
@@ -6,8 +6,12 @@ module CatRouter::InstanceMethods
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def handle_cat_routes
|
9
|
-
@cat_route = CatRoute.with_slug(params[:slug] ? params[:slug] : '').first
|
10
|
-
|
9
|
+
@cat_route = CatRoute.with_slug(params[:slug] ? params[:slug] : '').with_domain(request.host).first
|
10
|
+
if @cat_route.present?
|
11
|
+
render :layout => true, :inline => @cat_route.html ? @cat_route.html : ''
|
12
|
+
else
|
13
|
+
render :text => 'No CatRoute default route found!'
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|
13
17
|
end
|
data/lib/cat_router/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cat_router
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kristijan Sedlak
|