문제

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