demarches-normaliennes/app/controllers/champs/rna_controller.rb
2024-08-22 09:26:48 +02:00

12 lines
380 B
Ruby

# frozen_string_literal: true
class Champs::RNAController < Champs::ChampController
def show
champs_attributes = params.dig(:dossier, :champs_public_attributes) || params.dig(:dossier, :champs_private_attributes)
rna = champs_attributes.values.first[:value]
unless @champ.fetch_association!(rna)
@error = @champ.association_fetch_error_key
end
end
end