jipe_app/app/mailers/general.rb
2017-08-14 10:53:30 +02:00

28 lines
658 B
Ruby

class General < ActionMailer::Base
default :from => "Jipe <contact@jipe.fr>"
self.default_url_options = {:host => HOSTNAME}
layout "mail2"
def confirm_email(registrant)
@registrant = registrant
@lang_site = @registrant.lang_site
if @lang_site.id == 2
@title = "Confirmation of your email address."
else
@title = "Confirmation de votre adresse email."
end
mail(:to => @registrant.email, :subject => @title) do |format|
format.html {
if @lang_site.id == 2
render :action => "en_confirm_email"
else
render :action => "fr_confirm_email"
end
}
end
end
end