Files
old-holivud2/app/controllers/public/casting_call_interviews_controller.rb
2020-07-16 17:38:21 +02:00

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