Open edouard opened 1 year ago
For the record - Here is the PR that broke compatibility: https://github.com/rails/rails/pull/49340
I think https://github.com/svenfuchs/routing-filter/pull/86 would fix this.
That PR does not fix the issue in our app. It appears to be a different error in that it avoids some exception. It does not fix the "silent failure" for mutating params.
Temporary fix is to use params: { locale: "en" }
in button_to
helper, see https://edgeapi.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-button_to.
I discovered this problem in a new app, but after fixing this, I still can not redirect to correct root path, because after redirect_back_or_to root_path(locale)
, I still have the old URL in my browser. Seams to be related to how Turbo 8 is now loading/reloading the pages. Anyway, need to figure out, what is wrong in my setup, as the approach described in https://edgeguides.rubyonrails.org/i18n.html#managing-the-locale-across-requests is not working for me (and probably for all new apps?).
It worked fine with rails 7.0 but not with 7.1. When using
filter :locale
inroutes.rb
,params[:locale]
isn't set to anything