(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@foo.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@gmail.com' @from = 'do-not-reply@foo.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