my problem should be rather simple, but i didn't got it.
For example i have the following data from the database:
@user = User.all
then i have an other array of user
other_user = getting_them_from_somewhere_else
Now i iterate over the two arrays and check if some users are still in the database by checking for the emails:
@other_user.each do |o|
@user.each do |u|
if o["email"] == u["user_mail"]
@user.delete(u)
break
end
end
... do something with o ...
end
The method @user.delete(u) deletes the user from the database, but i just want to remove the object u from the array @user.