-
Notifications
You must be signed in to change notification settings - Fork 495
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
CheckoutController update_registration hack breaks validation if 'address' step is out of flow #31
Comments
Please provide steps to reproduce this issue. I don't understand your short description of the problem. |
Well... there is only one step in my case. To remove 'address' step from the flow. When I manually set state to 'address' and try to update_attributes({email: 'some@example.com'}) for checking out as a guest, I always get validation error: @messages={:state=>["is invalid", "is invalid"]} It seems like validation of state happens inside of state_machine, that's why I propose to use one of the actualy existing steps of checkout flow. |
Just saw this. I've attempted to fix this is PR59. Let me know if it works for you. Edit: funny you used the exact same fix/syntax I did (and I hadn't seen this until after I PRed)! haha |
That's exactly how I fixed it locally. :) |
I don't use 'address' step in my application and I get region validation error (related to Address I guess) trying to checkout as guest.
Why not to take first of the checkout_steps?
current_order.state = current_order.checkout_steps.first
The text was updated successfully, but these errors were encountered: