app/controllers/opt_out_links_controller.rb
def complete_optout(optout_record)
    recognition_record = Recognition.find_by(id: optout_record.recognition_id)
    if recognition_record
      recognition_record.suppressed = true
      recognition_record.save!
    end
    optout_record.delete
  end
# Finish the optout process by suppressing the recognition and removing the optoutlink
Finish the optout process by suppressing the recognition and removing the optoutlink
Finish the optout process by suppressing the recognition and removing the optoutlink
def complete_optout(optout_record)
    recognition_record = Recognition.find_by(id: optout_record.recognition_id)
    if recognition_record
      recognition_record.suppressed = true
      recognition_record.save!
    end
    optout_record.delete
  end
def complete_optout ( optout_record ) recognition_record = Recognition . find_by ( id : optout_record . recognition_id ) if recognition_record recognition_record . suppressed = true recognition_record . save! end optout_record . delete end
Finish the optout process by suppressing the recognition and removing the optoutlink
Finish the optout process by suppressing the recognition and removing the optoutlink
optout_record