On Jan 27, 9:13 pm, CiriusMex <cirius...@gmail.com> wrote: > Hello, I'm trying to create a function to send mail with an attached > file. After an hour reading rails documentation and a few intents I > can't figure out this error: > > undefined local variable or method 'attachments' for Emailer:Class > > Here comes the code of the mail creation function: > > class Emailer < ActionMailer::Base > ... > def Emailer.sendMailBCCWithAttachments(recipient, subject, message, > from, newsletter)
Haven't used the 3.0 ActionMailer much yet, but the docs say that sendMailBCCWithAttachments (and seriously, this isn't Java - underscores FTW! :) ) shouldn't be a class method, but rather an instance method (lose the 'Emailer.' part). --Matt Jones -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.