demarches-normaliennes/app/controllers/users/dossiers/add_siret_controller.rb
2018-10-01 16:15:46 +02:00

16 lines
470 B
Ruby

class Users::Dossiers::AddSiretController < ApplicationController
def show
@facade = DossierFacades.new params[:dossier_id], current_user.email
if !@facade.procedure.individual_with_siret?
raise ActiveRecord::RecordNotFound
end
if current_user.siret.present?
@siret = current_user.siret
end
rescue ActiveRecord::RecordNotFound
flash.alert = t('errors.messages.dossier_not_found')
redirect_to url_for dossiers_path
end
end