views:

13

answers:

0

I am trying to use an existing partial in an actionmailer template, something like..

My merchant_offer.txt.html.erb

<%= render :partial => "offers/offer", :locals => {:offer => @offer} %>

Notifier.rb (my mailer class)
    def merchant_offer(offer)
        subject "New Offer from #{offer.merchant.name}"
        from "[email protected]"
        recipients xxx@
        sent_on Time.now
        body :offer => offer
    end

The offer partial in in another view folder called offers

But it throws a missing tempalate error.

Is there a way to re-use existing view partial in in mailer tempalates?

Thanks