demarches-normaliennes/app/controllers/users/dossiers/invites_controller.rb

18 lines
569 B
Ruby
Raw Normal View History

class Users::Dossiers::InvitesController < UsersController
def authenticate_user!
session["user_return_to"] = request.fullpath
2018-03-06 13:44:29 +01:00
return redirect_to new_user_registration_path(user_email: params[:email]) if params[:email].present? && User.find_by(email: params[:email]).nil?
super
end
def show
2017-01-04 18:03:03 +01:00
@facade = InviteDossierFacades.new params[:id].to_i, current_user.email
render 'users/recapitulatif/show'
rescue ActiveRecord::RecordNotFound
flash.alert = t('errors.messages.dossier_not_found')
redirect_to url_for dossiers_path
end
2017-04-04 15:27:04 +02:00
end