i’m trying to email multiple people based on certain criteria.
i do a search like
@stacks = Group.find(:all, :conditions => [“component_id = ?”, 2])
this populates stack to contain multiple groups with component_id =2.
How do i populate @recipients to contain all possible @stack.email.
Let me clearify. Each stack has its own email, and i need to include
each stack.email into @recipients.
i’ve been trying to do
@stacks.each do |stack|
@recipients = stack.email
But i know this is wrong, but i think it’s a step in the right direction
Please help if possible,