In my application all routes are scoped to a locale, that user has selected like this:
scope ":locale", locale: /#{SpreeI18n::Config.supported_locales.join('|')}/ do
devise_for :users, skip: :omniauth_callbacks
get '/', to: 'homepage#index', :as => :homepage
end
When I want to send reset password instructions like User.find(1).send_reset_password_instructions
, there is a problem:
Devise::Mailer#reset_password_instructions: processed outbound mail in 4249.9ms
ActionView::Template::Error: No route matches {:action=>"edit", :controller=>"devise/passwords", :reset_password_token=>"-zyuNkscVkwFn2awdm27"} missing required keys: [:locale]
How can I pass locale so that I can send the reset token?