lundi 1 août 2016

How do I find the set of values that are present in one database but not in another?

So, there are 2 databases : User and Teacher. Teacher.user_id is from User. So, how do I find in a ruby single command all the users who are not in teachers.

I meant something along the lines :

         User.not_in(Teacher.all)

Aucun commentaire:

Enregistrer un commentaire