4 ms·
Awesome, the form pattern is a useful one. My coworker and I were just talking about how frustrating it was to have validations coupled so tightly to the models
by faitswulff 9y ago
Awesome, the form pattern is a useful one. My coworker and I were just talking about how frustrating it was to have validations coupled so tightly to the models and this would have helped a lot. Thanks!
- joshmn 9y agoI guess the idea is that you don't need to only use what Rails provides you, and you're free to bake in your own Ruby as you see fit. Rails is just Ruby, after all, and its modular enough at its core to be extensible for all sorts of applications. You just might have to do some digging to get your Ruby code Rails-friendly, such as using POROs alongside a form builder requires you to include ActiveModel::Naming
- cutler 9y agoYes, this is the BIG problem I see with Rails yet you don't hear many developers complaining about it. Django and Laravel seem to treat validation separately from the model and so does Node.js. Why is Rails so rigid about this? Although I generally like Rails this the single potential show-stopper for me.