Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Writes that skip callbacks leave no event: update_all, update_columns, dependent: :nullify

Abierto
#2,357 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rails, ruby
Área
backend

Línea de trabajo

Empieza por las asociaciones dependientes de EventRegistration y FormField y, después, inspecciona los sitios de escritura citados: sectors_taggable.rb:52, affiliation.rb:191 y story_share_admin_controller. Traza cómo se registran los eventos del historial en torno a la eliminación de un registro y la eliminación de un campo de formulario. Se considera terminado cuando destruir un registro registra los cambios resultantes en affiliation y notification, y el caso del campo de formulario también deja un rastro.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug

🤖 From Claude:

AhoyTrackable hangs off after_create / after_update / after_destroy, so any write that bypasses callbacks is invisible. Distinct from #2351 (which is about who is acting) — here the callback never runs at all.

Where it bites

dependent: :nullify is an update_all. Destroying a parent silently rewrites its children:

  • destroying an EventRegistration re-points its notifications and affiliations
  • destroying a FormField orphans every form_answer
  • destroying an Address nullifies the affiliations pointing at it

The destroy of the parent is recorded. The rewrite of the children isn't, so the children's history shows nothing where the data changed under them.

Direct column writes:

  • SectorsTaggable resets the primary flag with update_all (sectors_taggable.rb:52)
  • Affiliation syncs org columns with update_columns (affiliation.rb:191)
  • story_share_admin_controller reorders with update_columns

Recommendation

Don't chase every call — most are deliberate (that's why they skip callbacks). Fix the ones where the silence misleads:

  1. Registration transfer / deletion — the affiliation and notification re-pointing is exactly the kind of thing an admin later asks about.
  2. Form field deletion — answers changing shape without a trace is a data-integrity story, not just an audit one.

For those, either record an explicit event where the write happens, or replace the bulk write with per-record saves where the volume is small enough (it is, in both cases).

Acceptance

Destroying a registration leaves a record of what happened to its affiliations and notifications — either on their own history or on the registration's.

Lenguaje dominante
Ruby
Estrellas
15
Forks
28
Merge medio
1 d 12 min
PR fusionados (30 d)
262

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rubyforgood/awbw

Todos los issues de rubyforgood/awbw

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.