the clue was in my question ..... I am using Devise .. so I should
scope the devise for :
scope "(:locale)", :locale => /en|nl/ do
devise_for :users .....
end
On 3 jan, 09:38, Erwin <yves_duf...-ee4meeAH724@public.gmane.org>
wrote:> As per the Rails 3 I18N documentation, I wrote in my routes.rb
>
> scope "(/:locale)", :locale => /en|nl/ do
> resources :users
> end
> match ''/:locale'' => ''home#index''
> root :to => "home#index"
>
> and in my ApplicationController.rb
> before_filter :set_locale
> def set_locale
> I18n.locale = params[:locale]
> end
> def self.default_url_options(options={})
> {:locale => I18n.locale}
> end
>
> but I sill get urls with the locale parameter as if the scope was
> ignored ...
>
> http://localhost:3000/users/sign_in?locale=en
>
> I rather should get : http://localhost:3000/en/users/sign_in
>
> ( I am using also Devise 1.2...)
>
> what could be wrong ? thanks for your suggestions
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.