Investigate Custom Devise Mailer
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Área
- authentication, backend
Línea de trabajo
Comienza con app/mailers/custom_devise_mailer.rb y spec/mailers/custom_devise_mailer_spec.rb; después, revisa los commits históricos y pull requests enlazados para rastrear el comportamiento de las invitaciones. Verifica cada criterio de finalización, confirma las comprobaciones pertinentes del remitente y del rol, y ejecuta la especificación del mailer; se considera terminado cuando la lógica está justificada y cualquier cambio necesario está cubierto por pruebas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
So we have a custom devise mailer that seems to be responsible for setting the subject line for Partner invitations.. Tests for reference
The code looks something like this:
if resource.has_role?(Role::PARTNER, :any) && resource.id == resource.partner.primary_user&.id
# do something
elsif resource.has_role?(Role::PARTNER, :any) && resource.id != resource.partner.primary_user&.id
# do something else
This code (I think at least) sends one message if the user being invited is the primary user for the Partner and another if they are not.
Criteria for Completion
Figure out if this code is correct:
- Does it make sense to check for
resource.has_role?(Role::PARTNER, :any)as opposed to a specific partner - does it make sense for these invitations to get sent from a Partner vs a Org?
- Do they even get sent from a Partner and not an Org?
- If we change the code to check for a specific partner will there be any issues?
- If it seems reasonable and necessary make the change 🙂
Historical context:
The mailer was originally added here: https://github.com/rubyforgood/human-essentials/commit/ff961af7f5051ec6e05dd9cdd4d055b5e650431d. It simply changed the invite message for inviting Partners instead of Orgs.
if resource.is_a?(PartnerUser)
"You've been invited to be a partner with #{resource.partner.organization.name}"
https://github.com/rubyforgood/human-essentials/pull/2232 allowed Partners to invite coworkers by checking that the inviter was the primary user for that Partner:
if resource.is_a?(PartnerUser) && resource.id != resource.partner.primary_user&.id
"You've been invited to #{resource.partner.name}'s partnerbase account"
https://github.com/rubyforgood/human-essentials/pull/3050 got rid of PartnerUsers and instead used partner_id
if resource.try(:partner_id) && resource.id == resource.partner.primary_user&.id
"You've been invited to be a partner with #{resource.partner.organization.name}"
https://github.com/rubyforgood/human-essentials/pull/3117 finally when roles got added we started checking by role instead of partner_id
if resource.has_role?(Role::PARTNER, :any) && resource.id == resource.partner.primary_user&.id
"You've been invited to be a partner with #{resource.partner.organization.name}"
- Lenguaje dominante
- Ruby
- Estrellas
- 594
- Forks
- 596
- Merge medio
- 1 d 17 h
- PR fusionados (30 d)
- 12
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rubyforgood/human-essentials
-
Export button on annual report should revert to "Export Report" from "Please Wait..." once report generated.Posiblemente ocupada @costajohnt la tomó hace 18 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
rubyforgood/human-essentials#5691 · 1 comentario · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
rubyforgood/human-essentials#5603 · 8 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Proposal: forecast-based reorder points and shortage allocation ("Replenishment Planner")Posiblemente ocupada @arnavt687 la tomó hace 21 días. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
rubyforgood/human-essentials#5728 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Ruby for Good 2026 DC stale
rubyforgood/human-essentials#5694 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Add optional phone number to users (esp Partner Users)Posiblemente ocupada @costajohnt la tomó hace 23 días. AbiertoDifficulty—Intermediate Ruby for Good 2026 DC
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
rubyforgood/human-essentials#5687 ·
Los mantenedores suelen responder en 1 día
Todos los issues de rubyforgood/human-essentials
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
scanaislop/aislop#482 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
ETQ admin, le select de condition d'une annotation répétable liste les champs publics deux foisAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
demarche-numerique/demarche.numerique.gouv.fr#14301 ·
Los mantenedores suelen responder en 1 día
-
Wrong permissions for sqliteAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
voxpupuli/puppet-powerdns#251 ·