Skip to content

Instantly share code, notes, and snippets.

@pkarman
Created January 11, 2019 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkarman/6f3a99e2c311fb6836c50d78672f1b79 to your computer and use it in GitHub Desktop.
Save pkarman/6f3a99e2c311fb6836c50d78672f1b79 to your computer and use it in GitHub Desktop.
RequestStore[:current_user] = User.system_user
rca = RampClosedAppeal.find 72882
# this should end in error
rca.reclose!
vacols_case_id = 3415206
# double check at each step
if rca.appeal.vacols_id == vacols_case_id
vacols_case = VACOLS::Case.find vacols_case_id
if vacols_case.bfdc == "G"
vacols_case.update!(bfdc: nil)
rca.reload
# should succeed
rca.reclose!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment