ActionMailer rhtml in deep file hierarchy bad?

I have a big project I am working on, and like to use file hierarchy
conventions to keep portions of the system separated. I ran the
following command:

bojo@boji:~/Development/rails/ims$ ruby script/generate mailer work/
      create app/models/work/mail
      create app/views/work/mail/notifier
      create test/unit/work/mail
      create test/fixtures/work/mail/notifier
      create app/models/work/mail/notifier.rb
      create test/unit/work/mail/notifier_test.rb

Added a method to my model:

class Work::Mail::Notifier < ActionMailer::Base

    def project_notification(user)
        recipients user[:email]
        from ""
        subject "Test Mail"
        # body "user" => user
        body "Test Mail Body"


And called it from a controller:


This all works fine without calling an actual .rhtml template.
However, when I replaced the body method with something that passes
instance variables, I get the following error:

ActionView::ActionViewError (No rhtml, rxml, rjs or delegate template
found for project_notification):
base.rb:389:in `find_template_extension_for'
base.rb:325:in `pick_template_extension'
base.rb:240:in `render_file'
base.rb:274:in `render'

(etc, etc, etc)

I do have a template located at:


Am I missing something here, or is the ActionMailer not capable of
referencing the .rhtml file right?


Brian Jones