@@ -13,7 +13,7 @@ class CalibrationSessionsController < BaseController
1313 def index
1414 add_to_breadcrumbs t ( ".title" )
1515 calibration_sessions = policy_scope ( CalibrationSession )
16- . includes ( calibration_template : :company_evaluation_template ,
16+ . includes ( calibration_template : :company_evaluation_templates ,
1717 calibration_session_judges : :judge ,
1818 calibration_session_users : [ :evaluation_user_capability , :user ] )
1919 . where ( calibration_template_id : CalibrationTemplate . open_for_user_calibration_template_ids )
@@ -32,7 +32,7 @@ def show
3232 return redirect_to staff_root_path , alert : I18n . t ( "staff.calibration_sessions.show.finalized" ) unless @calibration_session . session_status == "calibrating"
3333 return redirect_to staff_root_path , alert : I18n . t ( "staff.calibration_sessions.show.can_not_start" ) unless @calibration_session . can_start_calibration?
3434
35- @group_level = @calibration_session . calibration_template . company_evaluation_template . group_level
35+ @group_level = @calibration_session . company_evaluation_template . group_level
3636 respond_to do |format |
3737 format . html do
3838 @calibration_labels = {
@@ -80,7 +80,7 @@ def show
8080 end
8181
8282 def update
83- company_evaluation_template = @calibration_session . calibration_template . company_evaluation_template
83+ company_evaluation_template = @calibration_session . company_evaluation_template
8484 @group_level = company_evaluation_template . group_level
8585
8686 update_calibration_group ( params [ :calibration ] , company_evaluation_template )
@@ -126,7 +126,7 @@ def square
126126
127127 evaluation_user_capabilities = @calibration_session . calibration_session_users . collect ( &:evaluation_user_capability )
128128 @total_people_num = evaluation_user_capabilities . length
129- company_evaluation_template = @calibration_session . calibration_template . company_evaluation_template
129+ company_evaluation_template = @calibration_session . company_evaluation_template
130130 @evaluation_user_capabilities_group = company_evaluation_template . group_evaluation_user_capabilities ( evaluation_user_capabilities )
131131 render company_evaluation_template . square_template
132132 end
0 commit comments