We've moved discussions to Discord

FIX: i18n with locale included in URLs by default doesn't work

Pablo Soldi
if you uncommented the method "default_url_options" in app/controllers/concers/set_locale.rb

you prob will have this kind of error running tests: 

ActionController::UrlGenerationError: No route matches {:action=>"new", :controller=>"accounts/account_invitations", :locale=>#<Account id: 264178000, name: "Company"....}, missing required keys: [:account_id]

The way that I found to fix it, is adding at the end of test/test_helper.rb

Rails.application.configure do
  routes.default_url_options[:locale] = :en
end
Pablo Soldi
Same case for action_mailer

Rails.application.configure do
  routes.default_url_options[:locale] = :en
  config.action_mailer.default_url_options[:locale] = :en
end
Notifications
You’re not receiving notifications from this thread.