Use collect:
accounts = notices.collect{|n| n.account}
You may want to add :include => 'account' to your Event.find to eager load the accounts.
Peter Marks wrote:
Use collect:
accounts = notices.collect{|n| n.account}
You may want to add :include => 'account' to your Event.find to eager load the accounts.
Peter Marks wrote: