Ruby on Rails 3: setting a fixed location on a specific route

I installed rails_admin gem on my localized site (3 languages), and I need the admin area (/ admin) to always be in English. Any idea how to do this? Maybe I can force locale to route?

Thanks.

+4
source share
1 answer

I did not use rails_admin, but a quick scan of his repo would show it using any language installed in your application. I assume that you installed this in the before_filter file in your .rb application through one of the methods described in the Rails i18n manual. You will need to do this before filter_a little smarter. Perhaps something like:

if self.kind_of? RailsAdmin::ApplicationController I18n.locale = :en else # Your current code end 
+8
source

All Articles