Reputation: 7
I have stored all user's roles in database field like this - roles: ["customer", "employee"]. This field has structure like array. I need select all employees.
Please, could you advise me, how to do that?
Upvotes: 0
Views: 52
Reputation: 3709
User.where(roles: "%employee%")
Upvotes: 2