demarches-normaliennes/app/controllers/champs/dossier_link_controller.rb
2018-10-24 10:44:28 +02:00

13 lines
402 B
Ruby

class Champs::DossierLinkController < ApplicationController
before_action :authenticate_logged_user!
def show
@position = params[:position]
if params[:dossier].key?(:champs_attributes)
@dossier_id = params[:dossier][:champs_attributes][params[:position]][:value]
else
@dossier_id = params[:dossier][:champs_private_attributes][params[:position]][:value]
end
end
end