From 52fc6b030db73bcbaf3380e1bbeb60a0496d6432 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Wed, 4 Jun 2014 14:38:18 +0800 Subject: [PATCH] route with admin namespace --- config/routes.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/routes.rb b/config/routes.rb index 1daf9a4..d96d9d4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,2 +1,7 @@ Rails.application.routes.draw do + locales = Site.find_by(site_active: true).in_use_locales rescue I18n.available_locales + scope "(:locale)", locale: Regexp.new(locales.join("|")) do + namespace :admin do + end + end end