demarches-normaliennes/app/controllers/admin/previsualisations_controller.rb
2017-05-17 11:18:01 +02:00

15 lines
399 B
Ruby

class Admin::PrevisualisationsController < AdminController
before_action :retrieve_procedure
def show
@procedure
@dossier = Dossier.new(id: 0, procedure: @procedure)
PrevisualisationService.destroy_all_champs @dossier
@dossier.build_default_champs
@champs = @dossier.ordered_champs
@headers = @champs.select { |champ| champ.type_champ == 'header_section' }
end
end