Skip to content

Commit

Permalink
Revert "Revert "Removed unused methods""
Browse files Browse the repository at this point in the history
This reverts commit d88a1d1.
  • Loading branch information
fumimowdan committed Sep 22, 2023
1 parent 26c249f commit 84be3f6
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,6 @@ class ApplicationController < ActionController::Base

before_action :check_service_open!

delegate :application_route, to: :current_application
helper_method :application_route

def check_application!
return if session["application_id"]

redirect_to(root_path)
end

def current_application
Application.in_progress.find(session["application_id"])
end
helper_method :current_application

def current_applicant
current_application.applicant
end
helper_method :current_applicant

def check_teacher!
return unless application_route != "teacher"

redirect_to(new_applicants_application_route_path)
end

def check_trainee!
return unless application_route != "salaried_trainee"

redirect_to(new_applicants_application_route_path)
end

def check_service_open!
return if request.path == destroy_user_session_path # skip this for log out page
return if Gatekeeper.application_open?
Expand Down

0 comments on commit 84be3f6

Please sign in to comment.