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

14 lines
402 B
Ruby
Raw Normal View History

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