I’m working on a site where the sign-up process is multi-step.. so many little forms all update the user model (i’m using the devise gem for user authentication).
Should I post each of these steps to the same update action (overriding the RegistrationController update action)? Each form may require some logic before the update occurs, therefore the forms will require some way of figuring out what form it’s currently processing (either a hidden field or trying to establish from what params exist)
..or should I be posting the forms to individual actions (which isn’t very RESTful)?
Thanks!
I would not override the
RegistrationsControllerto add an update action. I would have a completely separateUsersControllerthat defines anupdateaction that takes the parameters for updating a user.Inside Spree (the thing I work on) we’ve got an
updateaction onCheckoutControllerthat works similar to how you want your users update action to work. Check it out.