demarches-normaliennes/app/controllers/admin/previsualisations_controller.rb

16 lines
398 B
Ruby
Raw Normal View History

class Admin::PrevisualisationsController < AdminController
before_action :retrieve_procedure
def show
@procedure
@dossier = Dossier.new(id: 0, procedure: @procedure)
PrevisualisationService.delete_all_champs @dossier
@dossier.build_default_champs
@champs = @dossier.ordered_champs
@headers = @champs.select { |champ| champ.type_champ == 'header_section' }
end
2017-04-04 15:27:04 +02:00
end