Investigate Custom Devise Mailer
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ệ
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Bắt đầu với app/mailers/custom_devise_mailer.rb và spec/mailers/custom_devise_mailer_spec.rb, sau đó xem xét các commit lịch sử và pull request được liên kết để theo dõi hành vi lời mời. Xác minh từng tiêu chí hoàn thành, xác nhận các kiểm tra liên quan đến sender và role, rồi chạy mailer spec; được coi là hoàn tất khi logic có cơ sở hợp lý và mọi thay đổi cần thiết đều được kiểm thử.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
So we have a custom devise mailer that seems to be responsible for setting the subject line for Partner invitations.. Tests for reference
The code looks something like this:
if resource.has_role?(Role::PARTNER, :any) && resource.id == resource.partner.primary_user&.id
# do something
elsif resource.has_role?(Role::PARTNER, :any) && resource.id != resource.partner.primary_user&.id
# do something else
This code (I think at least) sends one message if the user being invited is the primary user for the Partner and another if they are not.
Criteria for Completion
Figure out if this code is correct:
- Does it make sense to check for
resource.has_role?(Role::PARTNER, :any)as opposed to a specific partner - does it make sense for these invitations to get sent from a Partner vs a Org?
- Do they even get sent from a Partner and not an Org?
- If we change the code to check for a specific partner will there be any issues?
- If it seems reasonable and necessary make the change 🙂
Historical context:
The mailer was originally added here: https://github.com/rubyforgood/human-essentials/commit/ff961af7f5051ec6e05dd9cdd4d055b5e650431d. It simply changed the invite message for inviting Partners instead of Orgs.
if resource.is_a?(PartnerUser)
"You've been invited to be a partner with #{resource.partner.organization.name}"
https://github.com/rubyforgood/human-essentials/pull/2232 allowed Partners to invite coworkers by checking that the inviter was the primary user for that Partner:
if resource.is_a?(PartnerUser) && resource.id != resource.partner.primary_user&.id
"You've been invited to #{resource.partner.name}'s partnerbase account"
https://github.com/rubyforgood/human-essentials/pull/3050 got rid of PartnerUsers and instead used partner_id
if resource.try(:partner_id) && resource.id == resource.partner.primary_user&.id
"You've been invited to be a partner with #{resource.partner.organization.name}"
https://github.com/rubyforgood/human-essentials/pull/3117 finally when roles got added we started checking by role instead of partner_id
if resource.has_role?(Role::PARTNER, :any) && resource.id == resource.partner.primary_user&.id
"You've been invited to be a partner with #{resource.partner.organization.name}"
- Ngôn ngữ chính
- Ruby
- Star
- 594
- Fork
- 596
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của rubyforgood/human-essentials
-
Export button on annual report should revert to "Export Report" from "Please Wait..." once report generated.Có thể đã có người làm @costajohnt đã nhận 16 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
rubyforgood/human-essentials#5691 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
rubyforgood/human-essentials#5603 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix typos in comments, docs and spec descriptionsCó thể đã có người làm @geographybuff đã nhận 3 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 25/100
rubyforgood/human-essentials#5741 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Proposal: forecast-based reorder points and shortage allocation ("Replenishment Planner")Có thể đã có người làm @arnavt687 đã nhận 18 ngày trước. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
rubyforgood/human-essentials#5728 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Ruby for Good 2026 DC stale
rubyforgood/human-essentials#5694 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của rubyforgood/human-essentials
Issue tương tự
-
area/web interface
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
mastodon/mastodon#41009 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
yegor256/ellipsized#131 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100