Module: CatRouter::InstanceMethods
- Defined in:
- lib/cat_router/instance_methods.rb
Instance Method Summary collapse
Instance Method Details
#handle_cat_routes ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/cat_router/instance_methods.rb', line 12 def handle_cat_routes if @cat_route.present? render :layout => true, :inline => @cat_route.html ? @cat_route.html : '' else render :text => 'No CatRoute default route found!' end end |
#load_cat_route ⇒ Object
8 9 10 |
# File 'lib/cat_router/instance_methods.rb', line 8 def load_cat_route @cat_route = CatRoute.with_slug(params[:slug] ? params[:slug] : ':root').with_or_no_domain(request.host).first end |
#set_locale ⇒ Object
3 4 5 6 |
# File 'lib/cat_router/instance_methods.rb', line 3 def set_locale I18n.locale = :en I18n.locale = params[:locale] if params[:locale] end |