Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Consolidate app/queries/ and app/queriers/ into a single query-objects folder

Đã đóng Phù hợp với người mới
#2,943 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
rails, ruby
Lĩnh vực
backend

Hướng nghiên cứu

Bắt đầu bằng cách đọc Admin::WorkshopConcerns và entry point Admin::WorkshopsController#show, sau đó tìm AdminWorkshopAttendeeFlags trong app/queriers/. Di chuyển nó vào app/queries/ mà không thay đổi các caller của nó, rồi chạy các spec của Admin::WorkshopsController#show và dashboard. Hoàn tất khi app/queriers/ không còn tồn tại, class được resolve từ app/queries/ và cả hai khu vực test được nêu đều pass.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

good first issue refactoring tech debt

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 AdminWorkshopAttendeeFlags from app/queriers/ to app/queries/ and delete app/queriers/.
  • Leave the three existing call shapes alone for now — normalising DashboardQuery/SponsorsSearch interfaces is out of scope and needs its own discussion.

Acceptance

  • app/queriers/ no longer exists; AdminWorkshopAttendeeFlags resolves from app/queries/.
  • Callers unchanged (Admin::WorkshopConcerns references the same class name).
  • Admin::WorkshopsController#show and the dashboard specs pass.
Ngôn ngữ chính
Ruby
Star
104
Fork
205
Merge trung bình
1 ngày 2 giờ
Pull request đã merge (30 ngày)
81

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codebar/planner

Tất cả issue của codebar/planner

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.