Fail fast if passed champ_id is invalid
This commit is contained in:
parent
b596956761
commit
49c872fb97
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ class Champs::CarteController < ApplicationController
|
|||
@champ = Champ
|
||||
.joins(:dossier)
|
||||
.where(dossiers: { user_id: logged_user_ids })
|
||||
.find_by(id: params[:champ_id])
|
||||
.find(params[:champ_id])
|
||||
else
|
||||
@champ = Champs::CarteChamp.new(type_de_champ: TypeDeChamp.new(
|
||||
type_champ: TypeDeChamp.type_champs.fetch(:carte),
|
||||
|
|
Loading…
Reference in a new issue