Consolidate app/queries/ and app/queriers/ into a single query-objects folder
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
先阅读 Admin::WorkshopConcerns 和入口 Admin::WorkshopsController#show,然后在 app/queriers/ 下找到 AdminWorkshopAttendeeFlags。将其移动到 app/queries/,不要修改其调用方,然后运行 Admin::WorkshopsController#show 和 dashboard 的 spec。完成标准是 app/queriers/ 已不存在、该类可以从 app/queries/ 解析,并且列出的两个测试区域都通过。
由索引模型根据 Issue 内容生成。
描述
Problem
The repo has two folders for the same concept, with three different class shapes between them:
| Folder | Class | Shape | Used by |
|---|---|---|---|
app/queries/ |
DashboardQuery |
class-level methods (upcoming_events, total_upcoming_events_count) |
DashboardController |
app/queries/ |
SponsorsSearch |
ActiveModel::Model object with attr_accessor :name, :chapter |
Admin::SponsorsController |
app/queriers/ |
AdminWorkshopAttendeeFlags |
self.for_members(member_ids) → instance #to_h |
Admin::WorkshopConcerns |
queriers is not a name Rails developers recognise as an autoload convention (app/queries is), and the split isn't semantic — AdminWorkshopAttendeeFlags is the same kind of code as DashboardQuery: batched aggregate queries for controllers.
Proposed change
- Move
AdminWorkshopAttendeeFlagsfromapp/queriers/toapp/queries/and deleteapp/queriers/. - Leave the three existing call shapes alone for now — normalising
DashboardQuery/SponsorsSearchinterfaces is out of scope and needs its own discussion.
Acceptance
app/queriers/no longer exists;AdminWorkshopAttendeeFlagsresolves fromapp/queries/.- Callers unchanged (
Admin::WorkshopConcernsreferences the same class name). Admin::WorkshopsController#showand the dashboard specs pass.
- 主要语言
- Ruby
- 星标
- 104
- 派生
- 205
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 77
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codebar/planner 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 56/100
维护者通常 1 天内回复
-
InvitationManager silently no-ops on non-invitable events/workshops while controllers flash success未关闭bug
难度 3/5 1-2 天 新手友好度 72/100
维护者通常 1 天内回复
-
refactoring tech debt
难度 4/5 3-5 天 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 90/100
维护者通常 3 天内回复
-
L: docker L: elm L: github:actions L: helm L: ruby:bundler
难度 2/5 1-3 小时 新手友好度 85/100
dependabot/dependabot-core#16425 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复