<%# Bold, dark-fuchsia funder band so each group's header stands out.
- The funder name links to the donor's profile (org or person). %>
+ The funder name links to the funder's profile (org or person). %>
- <% if group.donor && allowed_to?(:show?, group.donor) %>
- <%= link_to polymorphic_path(group.donor), data: { turbo_frame: "_top" },
+ <% if group.funder && allowed_to?(:show?, group.funder) %>
+ <%= link_to polymorphic_path(group.funder), data: { turbo_frame: "_top" },
class: "inline-flex items-center gap-1.5 hover:underline" do %>
<%= group.name %>
diff --git a/spec/models/event_registration_spec.rb b/spec/models/event_registration_spec.rb
index 3efd911b0..0e0e6fcee 100644
--- a/spec/models/event_registration_spec.rb
+++ b/spec/models/event_registration_spec.rb
@@ -260,7 +260,7 @@ def registration_with_scholarship
describe ".funder_name" do
it "matches registrations funded by a scholarship whose grant funder name matches" do
matching_reg = create(:event_registration)
- grant = create(:grant, funder: create(:organization, name: "Big Donor Foundation"))
+ grant = create(:grant, funder: create(:organization, name: "Big Funder Foundation"))
scholarship = create(:scholarship, grant: grant, recipient: matching_reg.registrant)
create(:allocation, source: scholarship, allocatable: matching_reg, amount: 0)
@@ -269,7 +269,7 @@ def registration_with_scholarship
recipient: other_reg.registrant)
create(:allocation, source: other, allocatable: other_reg, amount: 0)
- results = EventRegistration.funder_name("big donor")
+ results = EventRegistration.funder_name("big funder")
expect(results).to include(matching_reg)
expect(results).not_to include(other_reg)
end
diff --git a/spec/requests/events_spec.rb b/spec/requests/events_spec.rb
index 7cf312d2d..75286b293 100644
--- a/spec/requests/events_spec.rb
+++ b/spec/requests/events_spec.rb
@@ -2924,7 +2924,7 @@ def ce_chip_text
registration = event.event_registrations.find_by(registrant: applicant)
org = create(:organization, name: "Joyful Heart Foundation")
create(:address, addressable: org, city: "Los Angeles", state: "CA")
- grant = create(:grant, name: "Healing Arts Fund", donor: org, amount_cents: 100_000)
+ grant = create(:grant, name: "Healing Arts Fund", funder: org, amount_cents: 100_000)
scholarship = create(:scholarship, recipient: applicant, grant: grant, amount_cents: 1_000)
create(:allocation, source: scholarship, allocatable: registration, amount: 1_000)
@@ -2932,7 +2932,7 @@ def ce_chip_text
expect(response).to have_http_status(:ok)
page = Capybara.string(response.body)
- # The funder name renders as a section header linking to the donor's profile,
+ # The funder name renders as a section header linking to the funder's profile,
# with its city/state alongside.
expect(page).to have_css("h2 a[href='#{organization_path(org)}']", text: "Joyful Heart Foundation")
expect(page).to have_content("Los Angeles, CA")
diff --git a/spec/services/event_dashboard_spec.rb b/spec/services/event_dashboard_spec.rb
index 734883098..3772ff613 100644
--- a/spec/services/event_dashboard_spec.rb
+++ b/spec/services/event_dashboard_spec.rb
@@ -511,12 +511,12 @@
end
describe "#scholarship_applicants_by_funder" do
- it "buckets applicants by their scholarship's grant funder, unfunded last, carrying the donor and its city/state" do
+ it "buckets applicants by their scholarship's grant funder, unfunded last, carrying the funder and its city/state" do
embedded_reg = event.event_registrations.find_by(registrant: embedded_applicant)
separate_reg = event.event_registrations.find_by(registrant: separate_applicant)
- donor = create(:organization, name: "Joyful Heart Foundation")
- create(:address, addressable: donor, city: "Los Angeles", state: "CA")
- grant = create(:grant, name: "Healing Arts", donor: donor, amount_cents: 100_000)
+ funder = create(:organization, name: "Joyful Heart Foundation")
+ create(:address, addressable: funder, city: "Los Angeles", state: "CA")
+ grant = create(:grant, name: "Healing Arts", funder: funder, amount_cents: 100_000)
funded = create(:scholarship, recipient: embedded_applicant, grant: grant, amount_cents: 1_000)
create(:allocation, source: funded, allocatable: embedded_reg, amount: 1_000)
unfunded = create(:scholarship, recipient: separate_applicant, amount_cents: 1_000)
@@ -526,10 +526,10 @@
expect(groups.map(&:name)).to eq([ "Joyful Heart Foundation", "Unfunded" ])
expect(groups.first.people).to eq([ embedded_applicant ])
- expect(groups.first.donor).to eq(donor)
+ expect(groups.first.funder).to eq(funder)
expect(groups.first.location).to eq("Los Angeles, CA")
expect(groups.last.people).to eq([ separate_applicant ])
- expect(groups.last.donor).to be_nil
+ expect(groups.last.funder).to be_nil
end
it "collects applicants with no awarded scholarship under 'No scholarship yet'" do