I’m developing a Rails 3 application that has two user types: Teacher and Company.
Teacher has many different fields that are specific to being a teacher, such as experience and hourly pay.
Company also has many company-specific fields.
From the front page, a user (regardless of type) should be able to log in by typing in a username and password.
Here’s my question:
What models should I have in my application? How do I connect them so that usernames still have to be unique, but so that I have a separate model for Teacher and for Company?
Thanks!
here is your answer http://www.tonyamoyal.com/2010/07/28/rails-authentication-with-devise-and-cancan-customizing-devise-controllers/