diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8960511..4fd4b27 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -35,17 +35,14 @@ def show_current_controller end def require_login(return_point = request.url) - if current_person.blank? - set_return_point(return_point) - flash[:error] = t('errors.restricted') - redirect_to login_path - end + return unless current_person.blank? + set_return_point(return_point) + flash[:error] = t('errors.restricted') + redirect_to login_path end def set_return_point(path) - if session[:return_point].blank? - session[:return_point] = path - end + session[:return_point] = path if session[:return_point].blank? end def return_point