From d8c5de13323be9571efc8a504ce1a0162bc931d7 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Wed, 4 Jun 2014 14:39:21 +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