Closed laynemcnish closed 9 years ago
Sorry, you have no idea how stupid I felt when I saw this! :blush: I ran tests for the new Disposable against all my other gems but not Reform haha.
BTW, thanks for the very clear bug report.
Your controller/form looks as if you want to give Trailblazer a go. The Operation
pattern encapsulates service logic and the form, your controller will end up as a very lean endpoint. You will love it.
Hello,
We did a full bundle update today while upgrading our Rails project and ran into the following issue: We are using Reform v2.0.3 and with the full update, Disposable was bumped to v0.1.10. In an #update, the form calls #validate on a param which changes all but one of the form fields to Uber::Options::Values. I have included the controller, form and test outputs below.
Report Controller:
Form:
Test:
Output: form before #validate is called:
form after #validate is called:
As you can see, before #validate is called, the form retains it's original form values and after validation, they are changed to Uber::Options::Values. The only form field that does not change is the 'name' which is also the only attribute with a validation in the RemoteReportForm.