|
|
|
|
|
by fyfy18
2679 days ago
|
|
I've been using parts of it on most Rails apps I've worked on for the last few years.
The form object pattern (Reform) really helps when you need to update the same model in different places with different validations. For example maybe an Order only needs a price when it's created, but needs a invoice number (and some other validations) when marked as paid, but an admin should be able to override those validations at any stage. If you are doing something like that with standard Rails the model is going to end up as an untestable mess, where as the form objects can be tested on their own. My only complaint is that the creators of Trailblazer really don't seem to like Rails, so trying to get them to both work together can sometimes be a bit tricky. And the documentation is lacking if you want to do some more complicated things. |
|