Forum: Ruby on Rails ActionMailer into a Component

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Laurent (Guest)
on 2007-06-20 14:16
(Received via mailing list)
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
This topic is locked and can not be replied to.