If you want to combine using AND (intersection), use merge:
If you want to combine using OR (union), use or (available in ActiveRecord 5+, or in 4.2 via where-or backport):
nr: #2 dodano: 2017-12-19 05:12
If it is related to some sort of filter then you should not use your this approach as it will have redundant data. Next worst thing is you are firing multiple queries to fetch user data. Instead of doing this you can go with different approaches.
With query string