From bb70a9b4076860d15611c624074dce740c84dc7c Mon Sep 17 00:00:00 2001 From: Wabo Date: Sat, 16 May 2026 11:55:18 -0400 Subject: [PATCH] Remove dangling :maybe_redirect_com callbacks (fixes 500s) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The rebrand commit (2796ddf4) deleted the `maybe_redirect_com` helper from ApplicationController — it was a DocuSeal-specific `.co → .com` 301 redirect with no role in WaboSign — but missed four `prepend_before_action :maybe_redirect_com` / `before_action` callsites that referenced it. Rails resolves before_action symbols at request time via `send`, so every gated action raised NoMethodError → HTTP 500. Affected URLs (now fixed): - GET /settings/esign (admin) - GET /submissions/:id (admin) - GET /start_form/:slug + /completed (public — signers) - GET /submissions/preview/:slug + /completed (public) No replacement needed — the original redirect was DocuSeal-specific. Co-Authored-By: Claude Opus 4.7 --- app/controllers/esign_settings_controller.rb | 2 -- app/controllers/start_form_controller.rb | 1 - app/controllers/submissions_controller.rb | 2 -- app/controllers/submissions_preview_controller.rb | 2 -- 4 files changed, 7 deletions(-) diff --git a/app/controllers/esign_settings_controller.rb b/app/controllers/esign_settings_controller.rb index c1c74843..5e6685ac 100644 --- a/app/controllers/esign_settings_controller.rb +++ b/app/controllers/esign_settings_controller.rb @@ -11,8 +11,6 @@ class EsignSettingsController < ApplicationController end end - prepend_before_action :maybe_redirect_com, only: %i[show] - before_action :load_encrypted_config authorize_resource :encrypted_config, parent: false, only: %i[new create] authorize_resource :encrypted_config, only: %i[update destroy show] diff --git a/app/controllers/start_form_controller.rb b/app/controllers/start_form_controller.rb index ed9c2629..c5adbab3 100644 --- a/app/controllers/start_form_controller.rb +++ b/app/controllers/start_form_controller.rb @@ -7,7 +7,6 @@ class StartFormController < ApplicationController skip_authorization_check around_action :with_browser_locale, only: %i[show update completed] - before_action :maybe_redirect_com, only: %i[show completed] before_action :load_resubmit_submitter, only: :update before_action :load_template before_action :authorize_start!, only: :update diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index 2e1bba67..200c3648 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -6,8 +6,6 @@ class SubmissionsController < ApplicationController load_and_authorize_resource :submission, only: %i[show destroy] - prepend_before_action :maybe_redirect_com, only: %i[show] - before_action only: :create do authorize!(:create, Submission) end diff --git a/app/controllers/submissions_preview_controller.rb b/app/controllers/submissions_preview_controller.rb index ed83c407..48da4354 100644 --- a/app/controllers/submissions_preview_controller.rb +++ b/app/controllers/submissions_preview_controller.rb @@ -5,8 +5,6 @@ class SubmissionsPreviewController < ApplicationController skip_before_action :authenticate_user! skip_authorization_check - prepend_before_action :maybe_redirect_com, only: %i[show completed] - TTL = 40.minutes def show