app/mailers/my_devise_mailer.rb
# to make sure that your mailer uses the devise views
to make sure that your mailer uses the devise views
to make sure that your mailer uses the devise views
def invitation_instructions(resource, token, opts={})
    invited_by = resource.invited_by
    invited_by_email = invited_by.email
    invited_to_account = Account.joins(:memberships).where(memberships: {user_id: resource.id, created_by_id: invited_by.id}).limit(1).first.try(:name)
    opts[:subject] = "#{invited_to_account} Invitation from #{invited_by_email}"
    super
  end
def invitation_instructions ( resource , token , opts = { } ) invited_by = resource . invited_by invited_by_email = invited_by . email invited_to_account = Account . joins ( :memberships ) . where ( memberships : { user_id : resource . id , created_by_id : invited_by . id } ) . limit ( 1 ) . first . try ( :name ) opts [ :subject ] = "#{invited_to_account} Invitation from #{invited_by_email}" super end
to make sure that your mailer uses the devise views
to make sure that your mailer uses the devise views
resource
<not_specific>
token
<not_specific>
opts
<not_specific>