On 12/27/05, Xavier N. email@example.com wrote:
In Depot, the demo application in the the Agile book, actions that
modify the model such as add_to_cart redirect to another action that
has a clear view role, like index, or show_cart, instead of
generating the view themselves. This uses an HTTP redirect that goes
to the client and returns.
Is this an idiomatic way to design the flow in Rails?
I suppose that’s the way David writes his apps, so naturally it’s how
Rails scaffolding works. You can of course do whatever you wish.
These days those actions now have rjs templates for ajax calls and the
redirect for normal http calls (in my own apps anyway, YMMV).