I’m fairly new to Rails and I’m developing a site with the usual
register/login/logout/forgotpassword functionality.
I know everyone has their own way of doing things, but I was wondering
if there is a preferred standard for designing the controllers/actions
for this functionality. Would all of those be grouped into one
controller with specific actions or would each of them get their own
controller?
i don’t know if there’s a standard for doing it, but i normaly would do
it like this:
one controller (UsersController) for registering a new user, allow him
to edit or delete his account data and the forgotten password
functionality
another one (SessionsController) for login/logout (create/destroy
session)
that way you can keep the thing mostly restful
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.