Devise with many models

Oops! :slight_smile:
Have been looking like crazy for tutorials on STI (Single Table
Inheritance) and polymorphic associations to devise and use with many
models.
I’m in trouble here, I have three models (‘admin.rb’, ‘pesquisador.rb’
and ‘bolsista.rb’), the typical case of teacher, student and
administrator…
But the devise works only with a model, usually ‘user.rb’ as shown in
many tutorials…
What I wonder is how can I relate the models so I can create a generic
model 'usuario.rb’and use the devise, having an interface with
administrative privileges …

Thanks in advance! :smiley:

On 17 December 2010 19:23, [email protected] [email protected]
wrote:

model 'usuario.rb’and use the devise, having an interface with
administrative privileges …

I would suggest that you should be considering using the concept of
Roles, so they are all users, with different roles. Google for Rails
Roles and you will get many hits. You might like to look at Cancan
also.

Colin