Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

DashboardQuery eager-loads workshop_host with :sponsors in one join (same host-loss trap as #2975)

未关闭 适合新手
#2,982 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rails, ruby
领域
backend

调研方向

从 app/queries/dashboard_query.rb:5-6 开始,并将 DashboardQuery.upcoming_events 与 #2981 中的事件列表模式 Listable.most_recent 进行比较。使用 #2975 中的草图复现 workshop-host 的行为,然后应用建议的 eager-load/preload 安排,验证 dashboard 卡片中的场地输出。

由索引模型根据 Issue 内容生成。

描述

DashboardQuery.upcoming_events eager-loads :workshop_host together with :sponsors in one join (app/queries/dashboard_query.rb:5-6). Both associations route through the workshop_sponsors table, so the scoped has_one falls into the same eager-load alias trap documented in #2975: workshop_host comes back nil or points at a non-host sponsor, on a plan-dependent subset of workshops.

Suggested fix: the same pattern the events listing now uses (#2981, Listable.most_recent) — keep :sponsors in the join, move the host to preload:

Workshop.eager_load(:chapter, :sponsors, :organisers, :permissions)
        .preload(workshop_host: :sponsor)

Worth confirming first whether the dashboard card actually renders the wrong venue when workshop_host is lost (follow the same repro sketch as #2975), or only shows no venue.

主要语言
Ruby
星标
105
派生
206
平均合并
1 天 3 小时
30 天内合并 PR
74

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

codebar/planner 的其他 Issue

查看 codebar/planner 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。