Keeping your Rails forms under control
A typical Rails app has at least one complex form that creates or updates many different objects all at once. The usual way this is done involves spreading a lot of logic around, in models, controllers, and even in views. Anyone who has spent hours debugging Active Record's nested attributes knows what I'm talking about. Recent versions of Rails have quietly added several new features that help address this problem. I will show an example of how to use Active Model, responders, and form builders to reduce the complexity of your web forms while keeping the user experience nicely decoupled.
Example app at https://github.com/nertzy/store_example
Grant Hutchins
Annual Pro sale · Save $30
Have presentations of your own?
Share with private links, password protection, and more control over your work.