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

11 lines
349 B
Ruby
Raw Normal View History

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