Rails 3.1.3
I have setup devise and i18n . In routes.rb
scope "/:locale" do
devise_for :users, :controllers => { :registrations =>
'registrations' }
...
end
But in the process of confirmation,
No route matches {:action=>"create",
:controller=>"devise/confirmations",
:confirmation_token=>"W65sGSMU9TNQwJDRzNzV"}
appears.
There is a similar issue such as
https://github.com/plataformatec/devise/issues/815
But I don't quite understand what to do as explained in this URL.
"Yes, you need to copy the views to your application and change the
confirmation_url (and all other calls) to pass the locale as parameter.
Another option is to configure default_url_options to include :locale.
There is probably something in the wiki, if not, check Rails
documentation."
Could anyone explain this to me more specifically?
soichi
on 2012-12-12 05:04
on 2012-12-12 06:55
I have added
def default_url_options(options={ })
logger.debug "default_url_options is passed options:
#{options.inspect}\n"
{ :locale => I18n.locale }
end
in application_controller.rb.
But I noticed that the log shows
Started GET "/en/users/sign_up" for 127.0.0.1 at 2012-12-12 14:49:09
+0900
Processing by RegistrationsController#new as HTML
Parameters: {"locale"=>"en"}
default_url_options is passed options: {}
...
no parameter is passed!
I don't know why...
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.