2016-02-08 18:16:18 +01:00
|
|
|
class Users::Dossiers::InvitesController < UsersController
|
2016-02-22 10:34:25 +01:00
|
|
|
|
|
|
|
def authenticate_user!
|
|
|
|
session["user_return_to"] = request.fullpath
|
|
|
|
return redirect_to new_user_registration_path(user_email: params[:email]) if !params[:email].blank? && User.find_by_email(params[:email]).nil?
|
|
|
|
|
|
|
|
super
|
|
|
|
end
|
|
|
|
|
2016-02-08 18:16:18 +01:00
|
|
|
def show
|
|
|
|
@facade = InviteDossierFacades.new params[:id], current_user.email
|
|
|
|
|
|
|
|
render 'users/recapitulatif/show'
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
flash.alert = t('errors.messages.dossier_not_found')
|
|
|
|
redirect_to url_for users_dossiers_path
|
|
|
|
end
|
|
|
|
end
|