(sorry if this is a dupe - first one didn''t go through)
This code worked fine in 1.1.6. I just migrated to 2.0.2 and I get the
error below. However, the fix that is suggested in the error does not apply
to my code. I don''t use an explicit call to "render."
Furthermore, the
latest API documentation for ActionMailer doesn''t mention explicitly
calling
"render." This is driving me nuts! Any help? Thanks!
# code
#In my Controller
def create
...
MembershipRequestMailer.deliver_receipt(@membership_request)
...
end
# In my Mailer
class MembershipRequestMailer < ActionMailer::Base
def receipt(membership_request)
@subject = ''NASDCTEc Membership Request Submission''
@recipients = membership_request.email
@from = ''do-not-reply-aId5eXd4UmQ@public.gmane.org''
@sent_on = Time.now
@body["membership_request"] = membership_request
@content_type = "text/html"
end
def submission(membership_request)
@subject = ''Membership Request Submission''
@recipients =
''foo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org''
@from = ''do-not-reply-aId5eXd4UmQ@public.gmane.org''
@sent_on = Time.now
@body["membership_request"] = membership_request
@content_type = "text/html"
end
end
# error
Due to changes in ActionMailer, you need to provide the mailer_name along
with the template name.
render "user_mailer/signup"
render :file => "user_mailer/signup"
If you are rendering a subtemplate, you must now use controller-like partial
syntax:
render :partial => ''signup'' # no mailer_name necessary
--
View this message in context:
http://www.nabble.com/Email-Sending-Now-Throws-Error-in-2.0.2-tp15394386p15394386.html
Sent from the RubyOnRails Users mailing list archive at Nabble.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
-~----------~----~----~----~------~----~------~--~---