2015-08-10 11:05:06 +02:00
|
|
|
class StartController < ApplicationController
|
|
|
|
def index
|
2015-09-22 10:52:55 +02:00
|
|
|
@procedure_id = params['procedure_id']
|
|
|
|
@procedure = Procedure.find(@procedure_id)
|
|
|
|
|
|
|
|
if @procedure.nil?
|
|
|
|
error_procedure
|
|
|
|
end
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
error_procedure
|
|
|
|
end
|
|
|
|
|
|
|
|
def error_procedure
|
|
|
|
render :file => "#{Rails.root}/public/404.html", :status => 404
|
2015-08-10 11:05:06 +02:00
|
|
|
end
|
2015-08-11 15:22:07 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
def error_siret
|
|
|
|
flash.now.alert = 'Ce SIRET n\'est pas valide'
|
|
|
|
render 'index'
|
|
|
|
end
|
2015-08-11 15:22:07 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
def error_login
|
|
|
|
flash.now.alert = 'Ce compte n\'existe pas'
|
|
|
|
render 'index'
|
|
|
|
end
|
2015-08-11 15:22:07 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
def error_dossier
|
|
|
|
flash.now.alert = 'Ce dossier n\'existe pas'
|
|
|
|
render 'index'
|
|
|
|
end
|
|
|
|
end
|