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,

Brandon Keepers wrote:

Andrew,

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

Use full_filename instead of public_filename

Brandon

Cheers Brandon,
That did the trick.

Andrew