firstdraft / draft_generators

Rails generators that help beginners learn to program.
MIT License
2 stars 3 forks source link

Add `account` generator #65

Closed raghubetina closed 4 years ago

raghubetina commented 5 years ago

This generator should produce a sign-in system similar to the one described in the recent Photogram Signin video; but it should also have a dedicated update profile page, with a cancel (delete) link.

We should separate the sign_in_form, add_cookie, and remove_cookie actions into a separate SessionsController (rather than putting everything into UsersController).

jelaniwoods commented 5 years ago

@raghubetina What should the default columns (minus the password_digest) be for the account? Should it be email like with devise? Or are we keeping username like we were doing during the summer quarter?

raghubetina commented 5 years ago

@jelaniwoods Good question. Let's start with a default of email and password_digest. Later on we can consider adding an option to customize the identifier column.

Let's also add a validation in the model for uniqueness (case insensitive) of the identifier column.