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
I am upgrading a project from Rails 5.1 to 5.2. I am also currently using 5.1 version of the gem but i did not see how it would work in the 6 versions. In this Rails upgrade upgrade there is a change to how fixtures are treated. Assume we have an ActiveRecord model User who was many Bones for this issue. The change in Rails 5.2 [2] is that calling the users fixture without params now returns all fixtures. In my rspec api doc i have a helper called before all tests that defines all the params for the api i am calling.
parameter :name, "Name of the user", required: is_create
parameter :bones, "Array of names or ids of bones which this user is associated with.", scope: :user
I tracked the "issue" down to the SetParam build_param_hash.. The call will call the bones method that matches the fixture method name. in rails 5.1 bones returned [] and 5.2 it returns all the bones in the fixture data. In my test i am updating the name for example. The problem is that it says to update all the bones but also the bones are not the correct format. I want names or ids but I am getting the full hashed object.
I read the commits in this repro and issues and did not seem to find anything like this. I am currently duct taping the method if it matches a fixture name to return an array but this seems like something is being done incorrect.
Thank you for your time on this project and in reading my issue. Any advice is much appreciated.
Dearest Maintainer,
I am upgrading a project from Rails 5.1 to 5.2. I am also currently using 5.1 version of the gem but i did not see how it would work in the 6 versions. In this Rails upgrade upgrade there is a change to how fixtures are treated. Assume we have an ActiveRecord model User who was many Bones for this issue. The change in Rails 5.2 [2] is that calling the users fixture without params now returns all fixtures. In my rspec api doc i have a helper called before all tests that defines all the params for the api i am calling.
I tracked the "issue" down to the SetParam build_param_hash.. The call will call the bones method that matches the fixture method name. in rails 5.1 bones returned
[]
and 5.2 it returns all the bones in the fixture data. In my test i am updating the name for example. The problem is that it says to update all the bones but also the bones are not the correct format. I want names or ids but I am getting the full hashed object.I read the commits in this repro and issues and did not seem to find anything like this. I am currently duct taping the method if it matches a fixture name to return an array but this seems like something is being done incorrect.
Thank you for your time on this project and in reading my issue. Any advice is much appreciated.
Dictated but not read,
Becker
[2] rails/rails#28692
The text was updated successfully, but these errors were encountered: