Attachment_fu uploaded file with Action mailer

Hello,

I have setup ActionMailer to send mail with attachments, but when I try
to send an email with an attachment that attachment_fu has uploaded
ActionMailer can’t find the files, it seems to be looking in the wrong
directory…

The mailer setup is:
attachment :body => File.read(document.public_filename)

now this is able to find all the right stuff,
/documents/000/001/file.txt
but it looks in the very base directory, in my C drive, not in my public
folder on my project.

Please help,
Andrew

Andrew,

On Sat, May 31, 2008 at 3:37 AM, Andrew D. [email protected] wrote:

The mailer setup is:
attachment :body => File.read(document.public_filename)

Use full_filename instead of public_filename

Brandon


Sessions by Collective Idea: Ruby on Rails training in a vacation
setting
http://sessions.collectiveidea.com

Brandon K. wrote:

Brandon

Cheers Brandon,
That did the trick.

Andrew