Hello
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:
/app/views/user_mailer/vic_announcement.rhtml
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:207:in
`compute_public_path''
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:164:in
`image_path''
C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:188:in
`image_tag''
#{RAILS_ROOT}/app/views/goalbuddies/_gbdisplay.rhtml:9:in
`_run_rhtml_47app47views47goalbuddies47_gbdisplay46rhtml''
#{RAILS_ROOT}/app/views/user_mailer/vic_announcement.rhtml:14:in
`_run_rhtml_47app47views47user_mailer47vic_announcement46rhtml''
#{RAILS_ROOT}/app/controllers/messages_controller.rb:397:in
`send_gmessage''
#{RAILS_ROOT}/app/controllers/messages_controller.rb:368:in `each''
#{RAILS_ROOT}/app/controllers/messages_controller.rb:368:in
`send_gmessage''
Thanks very much in advance for your help!
Mike
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---