Commit b7dc0535 authored by Jiri Strojil's avatar Jiri Strojil
Browse files

Moved method to before_action

parent 4355d89b
Pipeline #30806 passed with stage
in 42 minutes and 40 seconds
class SemesterProcessVolunteersController < ApplicationController
before_action :prepare_review, only: [:review_semester, :submit_review]
before_action :prepare_review, :initialize_nested_objects, only: [:review_semester, :submit_review]
before_action :set_semester_process_volunteer, only: [:show, :edit, :update]
before_action :set_semester, only: [:index]
include SemesterProcessVolunteerHelper
def review_semester
initialize_nested_objects
end
def review_semester; end
def submit_review
# you shall not pass
return if @semester_process_volunteer.commited_at
initialize_nested_objects
set_reviewed
assign_volunteer_attributes
build_nested_objects
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment