Investigate Custom Devise Mailer
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
調査の方向性
まず app/mailers/custom_devise_mailer.rb と spec/mailers/custom_devise_mailer_spec.rb から始め、続いてリンクされている過去のコミットとプルリクエストを確認して、招待の挙動を追跡します。各完了基準を検証し、関連する送信者とロールのチェックを確認して、mailer specを実行します。完了とは、ロジックが妥当な根拠に基づいており、必要な変更がテストでカバーされていることを意味します。
索引モデルが issue の本文から書いたものです。
説明
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}"
- 主要言語
- Ruby
- スター
- 594
- フォーク
- 596
- 平均マージ
- 1日 17時間
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
rubyforgood/human-essentials のほかの issue
-
Export button on annual report should revert to "Export Report" from "Please Wait..." once report generated.対応中かも @costajohnt が 17 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
rubyforgood/human-essentials#5691 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
stale
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rubyforgood/human-essentials#5603 · コメント 8 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Proposal: forecast-based reorder points and shortage allocation ("Replenishment Planner")対応中かも @arnavt687 が 20 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
rubyforgood/human-essentials#5728 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Ruby for Good 2026 DC stale
rubyforgood/human-essentials#5694 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Add optional phone number to users (esp Partner Users)対応中かも @costajohnt が 22 日前に担当しました。 オープンDifficulty—Intermediate Ruby for Good 2026 DC
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
rubyforgood/human-essentials#5687 ·
メンテナーはふだん 1 日以内に返信
rubyforgood/human-essentials の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sclorg/s2i-ruby-container#660 · コメント 1 件 ·
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
bridgetownrb/bridgetown#1130 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
hlascelles/que-scheduler#611 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
rapid7/metasploit-framework#22008 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
stripe/stripe-ruby#1994 ·
メンテナーはふだん 1 日以内に返信