0

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?

1
  • Try User.where(roles: "%employee%") Commented Mar 3, 2014 at 13:10

1 Answer 1

2
User.where(roles: "%employee%")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.