I\'m trying to do a conditional render of a different template from ActionMailer (Rails 3.1.1). I want most users to get the normal welcome.html.erb
template, but s
Funny in rails 3.2.14 This does NOT work for me:
mail(:to => "#{@user.name} <#{@user.email}>", :subject => "Welcome to ...") do |format|
format.html { render 'templatename' }
end
However this does:
mail(:to => "#{@user.name} <#{@user.email}>",
:subject => "Welcome to ...",
:template_name => template)