mardi 4 août 2015

Allowing admin and users to sign in using same form (rails)

I've created 2 tables, one for users and one for admins.

I created 2 tables as they both collect different information, but I want to be able to allow a sign in using an email address and password from both the admin and user tables via the same form.

Is this possible? I've looked around and people seem to have created 1 users table and added an admin boolean, but I wanted to avoid this and I didn't want to collect unnecessary data if I didn't need to.

Any help and assistance about how to best go around this would be great.

Aucun commentaire:

Enregistrer un commentaire