From 972694a9b590710b00826dac41d1bf9443dc350c Mon Sep 17 00:00:00 2001 From: Justin Miller <16829344+jmilljr24@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:37:52 -0400 Subject: [PATCH 1/3] set registration download link to direct url --- app/views/events/callouts/_resource_body.html.erb | 2 +- spec/requests/events/registration_ticket_callouts_spec.rb | 6 +++--- spec/requests/events/registrations_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/events/callouts/_resource_body.html.erb b/app/views/events/callouts/_resource_body.html.erb index 4b22d0e80e..4f2f0b8414 100644 --- a/app/views/events/callouts/_resource_body.html.erb +++ b/app/views/events/callouts/_resource_body.html.erb @@ -8,7 +8,7 @@ <% unless resource.single_page_pdf? %> The preview shows the first page only — download to get all pages. <% end %> - <%= link_to resource_download_path(resource), download: true, class: "btn btn-utility" do %> + <%= link_to url_for(resource.downloadable_asset.file), download: true, class: "btn btn-utility" do %> Download <% end %> diff --git a/spec/requests/events/registration_ticket_callouts_spec.rb b/spec/requests/events/registration_ticket_callouts_spec.rb index 037b6d8ece..7a81040211 100644 --- a/spec/requests/events/registration_ticket_callouts_spec.rb +++ b/spec/requests/events/registration_ticket_callouts_spec.rb @@ -43,7 +43,7 @@ get event_registration_ticket_callout_path(event, callout) expect(response).to have_http_status(:ok) - expect(response.body).to include(resource_download_path(resource)) + expect(response.body).to include(rails_blob_path(resource.downloadable_asset.file, only_path: true)) end it "does not find a callout belonging to a different event" do @@ -68,7 +68,7 @@ expect(response).to have_http_status(:ok) expect(response.body).to include("Read this first.") - expect(response.body).to include(resource_download_path(resource)) + expect(response.body).to include(rails_blob_path(resource.downloadable_asset.file, only_path: true)) end end @@ -83,7 +83,7 @@ get event_registration_ticket_callout_path(event, callout) expect(response).to have_http_status(:ok) - expect(response.body).not_to include(resource_download_path(resource)) + expect(response.body).not_to include("fa-download") end end end diff --git a/spec/requests/events/registrations_spec.rb b/spec/requests/events/registrations_spec.rb index ad62ba076c..60e2a33109 100644 --- a/spec/requests/events/registrations_spec.rb +++ b/spec/requests/events/registrations_spec.rb @@ -283,7 +283,7 @@ expect(response).to have_http_status(:success) expect(response.body).to include("AHA Moments") expect(response.body).to include(registration_ticket_path(registration.slug)) - expect(response.body).to include(resource_download_path(resource)) + expect(response.body).to include(rails_blob_path(resource.downloadable_asset.file, only_path: true)) end it "prompts to download for all pages on a multi-page resource" do From da6093820c4a2691edb2157506746acd9d850018 Mon Sep 17 00:00:00 2001 From: Justin Miller <16829344+jmilljr24@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:03:37 -0400 Subject: [PATCH 2/3] fix --- app/controllers/events/callouts_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/events/callouts_controller.rb b/app/controllers/events/callouts_controller.rb index 80ba2c2bf3..c736818163 100644 --- a/app/controllers/events/callouts_controller.rb +++ b/app/controllers/events/callouts_controller.rb @@ -14,7 +14,7 @@ class CalloutsController < ApplicationController HANDOUT_RESOURCE_TITLES = [ "2-Day AWBW Facilitator Training Worksheets & Handouts", "AWBW Training Workshop Worksheets", - "AHA Moments", + "Aha Moments", "Inviting and Responding to Participants' Sharing", "Letter to Supervisors" ].freeze @@ -24,7 +24,7 @@ class CalloutsController < ApplicationController "List of resources and worksheets we will reference and utilize during the training. You do not need to print them out, it may be helpful for you to access the links during the training.", "AWBW Training Workshop Worksheets" => "Worksheets you can create on during all 5 of the art workshops at the training. Any art materials are welcomed during creation.", - "AHA Moments" => + "Aha Moments" => "Worksheet you can use to reflect on the workshop, its impact, and how you'd like to apply it.", "Inviting and Responding to Participants' Sharing" => "A resource to invite and support sharing, active listening, and connection during breakout rooms.", From 1674bbd8951f655e801fca69d9e50fe45c51c32d Mon Sep 17 00:00:00 2001 From: Justin Miller <16829344+jmilljr24@users.noreply.github.com> Date: Thu, 25 Jun 2026 18:11:05 -0400 Subject: [PATCH 3/3] match name in spec --- spec/requests/events/registrations_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/requests/events/registrations_spec.rb b/spec/requests/events/registrations_spec.rb index 60e2a33109..f9ecb2b57b 100644 --- a/spec/requests/events/registrations_spec.rb +++ b/spec/requests/events/registrations_spec.rb @@ -259,7 +259,7 @@ let!(:registration) { create(:event_registration, event: event, registrant: user.person) } it "links each handout to its registrant resource page, returning to handouts" do - handout = create(:resource, title: "AHA Moments", kind: "Handout") + handout = create(:resource, title: "Aha Moments", kind: "Handout") get registration_handouts_path(registration.slug) expect(response).to have_http_status(:success) expect(response.body).to include(registration_resource_path(registration.slug, handout, return_to: "handouts")) @@ -275,19 +275,19 @@ let!(:registration) { create(:event_registration, event: event, registrant: user.person) } it "renders the resource with a back-to-ticket link and a download button" do - resource = create(:resource, title: "AHA Moments", kind: "Handout") + resource = create(:resource, title: "Aha Moments", kind: "Handout") create(:downloadable_asset, owner: resource) get registration_resource_path(registration.slug, resource) expect(response).to have_http_status(:success) - expect(response.body).to include("AHA Moments") + expect(response.body).to include("Aha Moments") expect(response.body).to include(registration_ticket_path(registration.slug)) expect(response.body).to include(rails_blob_path(resource.downloadable_asset.file, only_path: true)) end it "prompts to download for all pages on a multi-page resource" do - resource = create(:resource, title: "AHA Moments", kind: "Handout") + resource = create(:resource, title: "Aha Moments", kind: "Handout") create(:downloadable_asset, owner: resource) get registration_resource_path(registration.slug, resource) @@ -305,7 +305,7 @@ end it "is reachable by slug without logging in" do - resource = create(:resource, title: "AHA Moments", kind: "Handout") + resource = create(:resource, title: "Aha Moments", kind: "Handout") get registration_resource_path(registration.slug, resource) @@ -313,7 +313,7 @@ end it "returns to the handouts callout with a 'Handouts detail' header when reached from handouts" do - resource = create(:resource, title: "AHA Moments", kind: "Handout") + resource = create(:resource, title: "Aha Moments", kind: "Handout") get registration_resource_path(registration.slug, resource, return_to: "handouts") @@ -321,7 +321,7 @@ expect(response.body).to include("Back to handouts") expect(response.body).not_to include("Back to ticket") expect(response.body).to include("Handouts detail") - expect(response.body).to include("AHA Moments") + expect(response.body).to include("Aha Moments") end it "returns to the forms callout with a 'Forms detail' header when reached from forms" do