-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FormData Handling Nested Arrays Incorrectly in Rails 7.1.2 #50227
Comments
Same as (similar to) #49783 ? |
I don't see a difference between 7.0.6 and 7.1.2 when using that exact JS frontend code with new vanilla Rails apps. |
Thank you for your comment. After conducting further investigation, it seems that the root cause of this issue lies in the upgrade of the Rack middleware rather than in Rails itself. Considering this, I am inclined to withdraw this issue here, as it appears to be more relevant to the Rack middleware. Would you agree with closing this issue given the context provided? |
@makoto-atarashi That rack issue does not seem to apply to the issue you're having and I couldn't reproduce the params you're seeing logged regardless of the version of rack. Would you mind reproducing the issue with a small Rails app and sharing it here publicly? |
This issue has been automatically closed because there has been no follow-up response from the original author. We currently don't have enough information in order to take action. Please reach out if you have any additional information that will help us move this issue forward. |
Issue Overview
After upgrading Rails from version 7.0.6 to 7.1.2, FormData that is including nested array sent from frontend is being received differently on backend, causing processing troubles.
Steps to Reproduce
Expected Behavior
Expecting the data to be received on Rails 7.1.2 as it was on Rails 7.0.6.
Actual Behavior
Data received on Rails 7.0.6 was in the following format:
However, on Rails 7.1.2, it has changed as follows, and params[:items][:list] is not received as an array as expected:
Environment
Rails Version: 7.0.6 -> 7.1.2
Ruby version: ruby 3.2.2-p53
Front End: JavaScript, Fetch API
Specific Issue Points
On Rails 7.0.6, params[:items][:list] was correctly received as an array, but on Rails 7.1.2, params[:items][:list] is not received as an array as expected.
The text was updated successfully, but these errors were encountered: