Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

InvitationManager silently no-ops on non-invitable events/workshops while controllers flash success

Aberta
#2,945 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
72/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
rails, ruby
Domínio
backend

Direção de pesquisa

Start at Admin::WorkshopsController#invite and Admin::EventsController#invite, then trace the three InvitationManager methods and their handle_asynchronously calls. Confirm that non-invitable targets produce a warning without enqueueing, while invitable targets retain the current success flow and email behavior.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

bug

Problem

Three InvitationManager methods guard with error strings — send_event_emails, send_workshop_emails, send_virtual_workshop_emails all return 'The X is not invitable' unless x.invitable?. All three run via handle_asynchronously, so the return value is discarded by the DelayedJob worker. The controllers (Admin::WorkshopsController#invite, Admin::EventsController#invite) ignore the return anyway and flash "Invitations will be emailed out soon." unconditionally.

Net effect: when the target isn't invitable, nothing is sent and nobody learns — the flash lies.

Proposed change

  • Check invitable? in the controllers before enqueueing and flash a warning instead of the success message when it's false. (Raising inside the async method can't fix the flash — the raise happens after the redirect.)
  • Remove the now-dead string returns from InvitationManager; the internal batch-abort strings (start_invitation_batch → return result if result.is_a?(String)) may stay as internal control flow — implementer's call.

Acceptance

  • Inviting to a non-invitable event/workshop shows a warning flash and enqueues nothing.
  • Inviting to an invitable one behaves as today.
Linguagem predominante
Ruby
Estrelas
104
Forks
205
Merge médio
1d 4h
PRs com merge (30d)
77

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de codebar/planner

Todas as issues de codebar/planner

Issues semelhantes

Mais issues de Ruby

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.