demarches-normaliennes/app/controllers/users/dossiers/add_siret_controller.rb
2018-01-12 11:32:43 +01:00

13 lines
449 B
Ruby

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