Forum: Ruby on Rails actionmailer & picture

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Befa945ac6d3bf13c4b41657e8558f85?d=identicon&s=25 Mike Dershowitz (dersh53)
on 2007-06-17 20:32

I'm using action mailer to create an HMTL outbound email.  This email
renders a partial.  In that partial, a call is made to a public location
to get a picture for display in the email.

When this email is generate, I get the following error (note: I'm sure
it has something to do with not understanding the context of
actionmailer and how it functions):

 NoMethodError in Messages#send_gmessage

Showing app/views/goalbuddies/_gbdisplay.rhtml where line #9 raised:

undefined method `request' for #<UserMailer:0x44c58ac>

Extracted source (around line #9):

6:   <% if p.nil? %>
7:     <%= image_tag("no_pic.jpg", :alt => "user picture", :class =>
"friendPic") %><br>
8:   <% else %>
9:     <%= image_tag(p.public_filename(:small), :alt => "user picture",
:class => "friendPic")%>
10:   <% end %>
11:   </tr></td>
12:   <tr><td align="center">

Trace of template inclusion:

RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace

#{RAILS_ROOT}/app/controllers/messages_controller.rb:368:in `each'

Thanks very much in advance for your help!

Befa945ac6d3bf13c4b41657e8558f85?d=identicon&s=25 Mike Dershowitz (dersh53)
on 2007-06-18 15:09
Any help with this one?  Thanks!
This topic is locked and can not be replied to.