Andrew Doades wrote:> I have a list of 3 "report_admins" in my database, and when I
send an
> email I need to email to go to all 3 admins,
>
> So in the controller I put...
> @report_admins = ReportAdmin.find(:all)
>
> Then I told ActionMailer this...
> @recipients = report_admins.email
>
> But when I try and send this email I get this error...
> undefined method `email'' for #<Array:0x455e214>
>
> I have been told that I need to change this array into a string, but I
> don''t know how... How?
>
> Andrew
Hi
when you write ReportAdmin.find(:all) it gives array as result. so u
access each record through
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---