(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 = ‘[email protected]’
@sent_on = Time.now
@body[“membership_request”] = membership_request
@content_type = “text/html”
end
def submission(membership_request)
@subject = ‘Membership Request Submission’
@recipients = ‘[email protected]’
@from = ‘[email protected]’
@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.