-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Prepare for Rails 5.2 #7421
Prepare for Rails 5.2 #7421
Conversation
Leaving the object with unpersisted changes breaks order locking with this error (in various places): RuntimeError: Locking a record with unpersisted changes is not supported. Use `save` to persist the changes, or `reload` to discard them explicitly.
This guard clause was returning an instance of an unpermitted Params object (containing a blank hash) here, which was causing unexpected results in various places. Returning a blank hash explicitly resolved the issue. Fixes: 4) Admin::OrderCyclesController create as a manager of a shop when creation is successful returns success: true and a valid edit path Failure/Error: @order_cycle_params ||= PermittedAttributes::OrderCycle.new(params).call. to_h.with_indifferent_access ActionController::UnfilteredParameters: unable to convert unpermitted parameters to hash # ./app/controllers/admin/order_cycles_controller.rb:245:in `order_cycle_params' # ./app/controllers/admin/order_cycles_controller.rb:44:in `create' # ./spec/support/controller_requests_helper.rb:49:in `process_action_with_route' # ./spec/support/controller_requests_helper.rb:27:in `spree_post' # ./spec/controllers/admin/order_cycles_controller_spec.rb:124:in `block (5 levels) in <module:Admin>'
…ntroller, params are now sent inside a Parameters object, not as a hash
In the test setups here order.payments is empty
Codecov Report
@@ Coverage Diff @@
## master #7421 +/- ##
=======================================
Coverage 93.07% 93.07%
=======================================
Files 633 633
Lines 18145 18147 +2
=======================================
+ Hits 16889 16891 +2
Misses 1256 1256
Continue to review full report at Codecov.
|
Hey @andrewpbrett , Tested orders using:
both on the backoffice and shopfront. Spotted nothing regarding order states; all as before. Ready to go 🚀 |
What? Why?
More preparation for merging Rails 5.2
What should we test?
Let's do a quick test: submitting an order and checking the payment state and shipment state are okay. Basically checking for any regressions related to this issue: #7003
Release notes
Updated code to prepare for Rails 5.2
Changelog Category: Technical changes
Dependencies
Documentation updates