Move workshop domain rules out of Admin::WorkshopsController

Đang mở
#2,938 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rails, ruby
Lĩnh vực
backend

Hướng nghiên cứu

This umbrella issue is decomposed into #2939, #2940, and #2941, so start with the relevant sub-issue rather than changing it directly. Read Admin::WorkshopsController and Workshop, then follow the named methods and destroy path. Done means each independently shippable extraction is implemented and the controller no longer owns the specified domain rules.

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

Mô tả

refactoring tech debt

Problem

Admin::WorkshopsController is the largest controller in the app (~295 lines) and holds domain logic below the presentation layer:

  1. Domain validation in the controller (workshop_type_valid? adds a model error from the controller)
  2. Deletion policy in the controller (4-hour window + no-invitees rule)
  3. Organiser grant/revoke role diffing in private controller methods

Plan

This decomposes into three independent, individually shippable changes, tracked as sub-issues:

  • #2939 — Move the "physical workshop needs a host" validation onto Workshop
  • #2940 — Add Workshop#deletable? and use it in Admin::WorkshopsController#destroy
  • #2941 — Extract organiser grant/revoke diffing from Admin::WorkshopsController

Each can land separately; no ordering required.

Ngôn ngữ chính
Ruby
Star
106
Fork
208
Merge trung bình
19 giờ 51 phút
Pull request đã merge (30 ngày)
57

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.