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.
@@ -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
- render :layout => true, :inline => @cat_route.html ? @cat_route.html : ''
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
@@ -2,7 +2,7 @@ module CatRouter
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 4
5
+ TINY = 5
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristijan Sedlak