cat_router 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,6 @@ module CatRouter::Hook
4
4
 
5
5
  # now do the things that make the controller
6
6
  include CatRouter::InstanceMethods
7
- before_filter :set_locale
7
+ before_filter :set_locale, :load_cat_route
8
8
  end
9
9
  end
@@ -5,8 +5,11 @@ module CatRouter::InstanceMethods
5
5
  I18n.locale = params[:locale] if params[:locale]
6
6
  end
7
7
 
8
- def handle_cat_routes
8
+ def load_cat_route
9
9
  @cat_route = CatRoute.with_slug(params[:slug] ? params[:slug] : '').with_domain(request.host).first
10
+ end
11
+
12
+ def handle_cat_routes
10
13
  if @cat_route.present?
11
14
  render :layout => true, :inline => @cat_route.html ? @cat_route.html : ''
12
15
  else
@@ -2,7 +2,7 @@ module CatRouter
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 6
5
+ TINY = 7
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 6
10
- version: 0.1.6
9
+ - 7
10
+ version: 0.1.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kristijan Sedlak