26 lines
667 B
Ruby
26 lines
667 B
Ruby
class Public::CastingCallInterviewsController < Public::BaseController
|
|
skip_after_action :verify_authorized
|
|
before_action :set_casting_call_interview, only: [:show, :update]
|
|
|
|
def show
|
|
end
|
|
|
|
def update
|
|
if @casting_call_interview.update(casting_call_interview_params)
|
|
redirect_to casting_call_interview_url(token: @casting_call_interview.token), notice: t(".notice")
|
|
else
|
|
render :show
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def set_casting_call_interview
|
|
@casting_call_interview = CastingCallInterview.find_by_token(params[:token])
|
|
end
|
|
|
|
def casting_call_interview_params
|
|
params.require(:casting_call_interview).permit(files: [])
|
|
end
|
|
end
|