Вопрос

I'm working on a freelance site where there will be people looking to hire freelancers and freelancers looking for work. The homepage will display a list of freelancers in which users can click to view their profile.

I was wondering if it will be better to generate a Devise model for both freelancer and users or should I just generate one for User and then use a gem like Cancan to set authorization levels?

Это было полезно?

Решение

Have one User model with user type (freelancer vs client) and handle your authorization based on that.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top