Sha256: 08a362c8c5ac941749c7ca3739ed5cf4f4a6a27ac4918ecbd38e693ed8b4f0f6
Contents?: true
Size: 972 Bytes
Versions: 21
Compression:
Stored size: 972 Bytes
Contents
require_dependency "think_feel_do_engine/application_controller" module ThinkFeelDoEngine module Participants # Updates the completion of assigned tasks for a participant class TaskStatusController < ApplicationController before_action :authenticate_participant! rescue_from ActiveRecord::RecordNotFound, with: :record_not_found def update @task_status = current_participant .active_membership .task_statuses .find(params[:id]) begin if @task_status.engagements.build && @task_status.mark_complete render nothing: true, status: 200 else render nothing: true, status: 400 end rescue ActiveRecord::InvalidForeignKey render nothing: true, status: 400 end end private def record_not_found render nothing: true, status: 404 end end end end
Version data entries
21 entries across 21 versions & 1 rubygems