Displaying 2 results from an estimated 2 matches for "create_mailing_label".
2006 Feb 19
2
Missing text/html content in production (but not development)
...round with this, but can''t figure out what''s going
wrong. Can anyone suggest anything?
Here''s the mail-generation method that''s being invoked (from another,
public method) in my controller:
private
def generate_mailing_label_email
label = create_mailing_label(@order)
OrderMailer::deliver_mailing_label_message(@order, @person, label)
end
And here is the method that''s defined in OrderMailer < ActionMailer::Base:
def mailing_label_message(order, person, label)
@recipients = person.email_address
@subject = &...
2005 Dec 19
0
Re: Rails Digest, Vol 15, Issue 392
...o |a|
a.body = html
end
attachment "application/pdf" do |a|
a.body = label.render
a.filename = "mailing-label.pdf"
end
end
end
I then invoke the above method from my controller as follows:
def generate_confirmation_email
label = create_mailing_label(@order, @person)
html = render_to_string(:template => "order_mailer/confirm",
:layout => "blank")
OrderMailer::deliver_confirmation_message(@person, label, html)
end
And voila, it works! (Note that I created a "bl...