class MyDeviseMailer < Devise::Mailer # helper :application # gives access to all helpers defined within `application_helper`. helper :subdomain include Devise::Controllers::UrlHelpers # Optional. eg. `confirmation_url` default template_path: 'devise/mailer' # to make sure that your mailer uses the devise views def new_tenant_created(record, token, opts={}) @token = token @current_tenant_data = Tenant.find_by(name: Apartment::Tenant.current) devise_mail(record, :new_tenant_created, opts.merge( {subject: I18n.t(:subject, scope: [:devise, :mailer, :new_tenant_created], app_name: Settings.app.title, default: [:subject, :new_tenant_created])} ) ) end end