Created
August 1, 2012 18:47
-
-
Save argami/3229722 to your computer and use it in GitHub Desktop.
Locale on engine mount point (Spree)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spree::BaseController.class_eval do | |
before_filter :set_user_language | |
def set_user_language | |
I18n.locale = params[:locale] | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App::Application.routes.draw do | |
mount Spree::Core::Engine, :at => '/(:locale)/store' | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment