Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

make the usage of the locale filter configurable

  • Loading branch information...
commit a8d34bc108d237c907c4b9f32a15b53b4cdf4e1e 1 parent 146d84f
Stefano Pigozzi pigoz authored
Showing with 4 additions and 2 deletions.
  1. +2 −2 config/routes.rb
  2. +2 −0  lib/spree_multi_lingual/engine.rb
4 config/routes.rb
View
@@ -1,3 +1,3 @@
Spree::Core::Engine.routes.draw do
- filter :locale, :exclude => /^\/admin/
-end
+ filter :locale, :exclude => /^\/admin/ if SpreeMultiLingual.use_locale_filter
+end
2  lib/spree_multi_lingual/engine.rb
View
@@ -1,6 +1,8 @@
module SpreeMultiLingual
mattr_reader :languages
+ mattr_accessor :use_locale_filter
@@languages = [:en]
+ @@use_locale_filter = true
def self.languages=(locales=[])
I18n.available_locales = locales
Please sign in to comment.
Something went wrong with that request. Please try again.