# Ar\_mailer, class Email : add field to the table?

**URL:** <https://www.ruby-forum.com/t/ar-mailer-class-email-add-field-to-the-table/185846>\
**Category:** Rails\
**Created:** [March 27, 2010, 2:54am UTC](https://www.ruby-forum.com/t/ar-mailer-class-email-add-field-to-the-table/185846 "2010-03-27T02:54:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![korn900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5daacb/32.png) [@korn900](https://www.ruby-forum.com/u/korn900)\
**Post date:** [March 27, 2010, 2:54am UTC](https://www.ruby-forum.com/t/ar-mailer-class-email-add-field-to-the-table/185846/1 "2010-03-27T02:54:52Z")

</div>

Hi,

I use ar\_mailer to send emails from my application.  
I want to build a page where the admin case see the queue of mails and  
the possibility of remove some mail in the queue if he wants.  
The email in the queue are save in the AR model Email.  
I have an AR model Sent where i save the email that the user sent.  
I would like to add to the model Email a column to save the id of the  
corresponding Sent.  
Is it possible ? I can add the column sent\_id in the table emails but  
how can i fill it ?  
I just use a method deliver\_XXX to put the email in the queue, where  
can i write the instruction to fill the field sent\_id ??

Thanks for your help 🙂

adrien

---

<div class="post-metadata">

**Author:** ![korn900](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/5daacb/32.png) [@korn900](https://www.ruby-forum.com/u/korn900)\
**Post date:** [April 29, 2010, 5:05pm UTC](https://www.ruby-forum.com/t/ar-mailer-class-email-add-field-to-the-table/185846/2 "2010-04-29T17:05:35Z")

</div>

up
