I have one array in rails, which for the sake of simplicity, we shall say is
@users = current_account.users
I have several other arrays, which contains subsets of that first array. These look like this
@missing_genders = @users.select{ |u| u.gender.nil?}
@missing_reference = @users.select{ |u| u.reference_number.nil?}
I have a few others like this too. What I need is to produce a list of all the users who are NOT erroneous. so basically everyone in the first array, who does not exist in any of the other arrays?
thinking through it, I have
@main_array = [1,2,3,4,5]
@error_array_1 = [1]
@error_array_2 = [1,2,3]
And I am looking to generate
@final_array = [4,5]