attachments: remove the buggy fallback
The fallback would fail on non-champ attachments.
This commit is contained in:
parent
7e19dd2cda
commit
7ff381b6f0
2 changed files with 2 additions and 1 deletions
|
@ -8,7 +8,7 @@ class AttachmentsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.js
|
||||
format.html { redirect_back(fallback_location: @attachment.record&.dossier || root_path) }
|
||||
format.html { redirect_back(fallback_location: root_url) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ describe AttachmentsController, type: :controller do
|
|||
let(:format) { :js }
|
||||
|
||||
subject do
|
||||
request.headers['HTTP_REFERER'] = dossier_url(dossier)
|
||||
get :show, params: { id: attachment.id, signed_id: signed_id }, format: format
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue