app/models/applications/application_group_member.rb
# Marks a certain task complete. Note that this should only be done for tasks that don't have a +completion_criteria+ set,
# otherwise your action here will get overridden when #update_task_completion_status_cache! is run.
Marks a certain task complete. Note that this should only be done for tasks that don't have a +completion_criteria+ set,
otherwise your action here will get overridden when #update_task_completion_status_cache. is run.
Marks a certain task complete . Note that this should only be done for tasks that don ' t have a + completion_criteria + set otherwise your action here will get overridden when #update_task_completion_status_cache . is run .
def complete_task(task)
    self.task_completion_status_cache ||= {}
    task = OfferingAdminPhaseTask.find(task) unless task.is_a?(OfferingAdminPhaseTask)
    tcs = task_completion_statuses.find_or_create_by_task_id(task.id)
    tcs.result = true
    tcs.complete = true
    tcs.save
    self.task_completion_status_cache[task.id] = tcs.attributes
    tcs
  end
def complete_task ( task ) self . task_completion_status_cache ||= { } task = OfferingAdminPhaseTask . find ( task ) unless task . is_a? ( OfferingAdminPhaseTask ) tcs = task_completion_statuses . find_or_create_by_task_id ( task . id ) tcs . result = true tcs . complete = true tcs . save self . task_completion_status_cache [ task . id ] = tcs . attributes tcs end
Marks a certain task complete.
Marks a certain task complete .
task