demarches-normaliennes/app/controllers/champs/rna_controller.rb

13 lines
380 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Champs::RNAController < Champs::ChampController
2022-10-04 22:11:01 +02:00
def show
champs_attributes = params.dig(:dossier, :champs_public_attributes) || params.dig(:dossier, :champs_private_attributes)
rna = champs_attributes.values.first[:value]
2023-01-16 15:47:22 +01:00
unless @champ.fetch_association!(rna)
@error = @champ.association_fetch_error_key
end
2022-10-04 22:11:01 +02:00
end
end