That is finding all B records that have no parent. I want to find all A records that have no child…
I’m thinking that the best/fastest way to do this would to just use counters.
You wrote:
I would use a named_scope in this instance, assuming the relationship
fields are completely normal.
So the field that u want to check is the association id is nil.
an example for that would be like this:
named_scope :unassociated, :conditions => “foreignkey_id IS NULL”
hope that works…