Hi,
Sorry about the confusing title. I’m feeling a bit frustrated about Ruby
now…
Ok, I have a membership database appication. For one view, I would
like to show all members who has NOT payed for the current term 
So, with the models member and fee_payment, (one member has many
fee_payments) I try to get the exklusion by finding all members,
finding all fee_payments for the current term, and exclude the members
associated with a fee_payment in the fee_payments list from the list
of members => the members who has not payed.
So, this is what I tried:
@maybe_active_members = @club.members.find(:all,:conditions =>
[“is_active = ?”,true ], :order => “surname” )
@term = "VT2008" #Hard-coded term
#Find all mayments from the current term
@fps = FeePayment.find(:all, :conditions => ["term = ? AND club_id
= ?", @term , @club])
#Get an array of the member associated with the fee_payment
@fpm = @fps.each {|f | f.member }
#Exlude members who has payed from the list
@active_members = @maybe_active_members.reject {|m |
@fpm.include?(m) }
Arrgh! What am I doing wrong? Is there a simpler way?
NOT very good with this (or any other) stuff…
/Fredrik
–
“Give up learning, and put an end to your troubles.”