# ActionMailer into a Component

**URL:** <https://www.ruby-forum.com/t/actionmailer-into-a-component/107314>\
**Category:** Rails\
**Created:** [June 20, 2007, 12:16pm UTC](https://www.ruby-forum.com/t/actionmailer-into-a-component/107314 "2007-06-20T12:16:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurent](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/ce7236/32.png) [@laurent](https://www.ruby-forum.com/u/laurent)\
**Post date:** [June 20, 2007, 12:16pm UTC](https://www.ruby-forum.com/t/actionmailer-into-a-component/107314/1 "2007-06-20T12:16:07Z")

</div>

Hello

I’ve created a little component rsbt (for really Simple Bug Tracker) :  
\<app\_root\>/components/rsbt

Inside this component i have my MVC :  
bt\_controller.rb , bug.rb (model) and the view (into a ‘bt’ subfolder)

Then, i wanted a notification, once a Ticket has been submitted .  
So i’ve created a model notifier.rb (extending ActionMailer) and put  
it at the root of my component.  
Finally the associated template of my email , into ‘bt/notifier’  
subfolder

When testing : all is fine for the controller, retrieving the model  
notifier.  
But then the template should be retrieved in app/views/rsbt/notifier

As a first workaround, i moved my notification outside the component  
into the application.

My question : is there a workaround to force ActionMailer to retrieve  
the Mail Template into the view folder of a component?

Thanks

laurent
