Here is how I created an array:
@companies_with_email = Company.contact_emails_date_sent_gt(@monday).
contact_emails_date_sent_lt(@friday).
find(:all, :select => "distinct companies.* ") || []
@companies_with_call = Company.contact_calls_date_sent_gt(@monday).
contact_calls_date_sent_lt(@friday).
find(:all, :select => "distinct companies.* ") || []
@companies_with_activity = @companies_with_email + @companies_with_call
@companies_with_activity.uniq!
However, I want it to be in alphabetical order, so I tried to add .sort! and I got an error saying <=> method doesn't exist.
undefined method `<=>' for #<Company:0x9d506a8>