3 ms·
You're describing a problem that arises as a consequence of using an ORM, any ORM, which is not at all Rails specific.
by johnbender 16y ago
You're describing a problem that arises as a consequence of using an ORM, any ORM, which is not at all Rails specific.
- angrycoder 16y agowhen you have to spread your updates across 7 different controller actions (methods) to make it work the Rails way, it most certainly is a rails problem.
- vowelboy 16y agoYou're assuming that there is a hard coupling between Controllers and Models. There isn't. Rails suggests a CRUD pattern, but doesn't enforce it. You can quite easily (and elegantly) update 14 different tables from one form, using one request and one controller method.
- generalk 16y agoYou can quite easily (and elegantly) update 14 different tables from one form, using one request and one controller method. You can very transparently do it with ActiveRecord associations, so that you're operating on only one instance of a model, or you can do it very opaquely, where you instantiate and update several models. Or you can just run an UPDATE statement; those haven't gone away.