fix and dependency

This commit is contained in:
Bomrah Harry 2018-07-18 23:57:29 +08:00
parent a17b157a00
commit 1c765fa053
2 changed files with 6 additions and 6 deletions

View File

@ -415,9 +415,9 @@ class RecruitmentsController < PseudoSessionController
if profile.is_employer?
redirect_to mydashboard_path
elsif profile.is_employee?
if params[:commit] == "Next" && params[:step] == "step1"
if (params[:commit] == "Next" || params[:commit] == "下一個" ) && params[:step] == "step1"
redirect_to employee_academics_path
elsif params[:commit] == "Save"
elsif params[:commit] == "save" || params[:commit] == "儲存"
redirect_to mydashboard_path
end
end

View File

@ -35,10 +35,10 @@ class EmployeeProfile
belongs_to :recruit_profile
has_many :employee_academics
has_many :employee_experiences
has_many :employee_job_applications
has_many :employee_recommendations
has_many :employee_academics, :autosave => true, :dependent => :destroy
has_many :employee_experiences, :autosave => true, :dependent => :destroy
has_many :employee_job_applications, :autosave => true, :dependent => :destroy
has_many :employee_recommendations, :autosave => true, :dependent => :destroy
scope :job_seekers, ->{where(:active => true)}