You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue came up while migrating to 6.1, looking into writing a failing spec directly in rails/rails, rather than through controller testing, but this one helped pinpoint the issue as it showed up in our code.
We could change RouteSet to check if options.key?(:params) && options[:params].is_a?(Hash) before attempting a merge, but maybe there's a better way?
The text was updated successfully, but these errors were encountered:
When calling
get :action, params: { params: 'string' }
, RouteSet#url_for is trying to merge! the inner params string into the params hash.https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/routing/route_set.rb#L826
I added a failing test here:
https://github.com/sholden/rails-controller-testing/blob/bug/merge-nested-params/test/controllers/template_assertions_test.rb#L190
The issue came up while migrating to 6.1, looking into writing a failing spec directly in rails/rails, rather than through controller testing, but this one helped pinpoint the issue as it showed up in our code.
We could change RouteSet to check
if options.key?(:params) && options[:params].is_a?(Hash)
before attempting a merge, but maybe there's a better way?The text was updated successfully, but these errors were encountered: