On 17 December 2010 19:23, [email protected] <[email protected]> wrote: > Oops! :-) > 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 ..
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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

