Skip to content

Instantly share code, notes, and snippets.

@defong
Last active October 5, 2023 11:04
Show Gist options
  • Save defong/9c80ae20572880c1225a1b02ba18e8f0 to your computer and use it in GitHub Desktop.
Save defong/9c80ae20572880c1225a1b02ba18e8f0 to your computer and use it in GitHub Desktop.
[DfE] 2274-ellucian-sandbox-course-issue
#### Before state
run_me = false
(Provider.find_by(code: "EEU")) if run_me
#<Provider:0x00007fe5328a0768 id: 2619, name: "University of Ellucian", code: "EEU", created_at: Wed, 24 Feb 2021 12:23:48.431310000 GMT +00:00, updated_at: Mon, 20 Feb 2023 05:50:44.486124000 GMT +00:00, region_code: nil, postcode: "", provider_type: "university", latitude: nil, longitude: nil, vendor_id: nil>
# Supect rogue cache
# https://github.com/DFE-Digital/apply-for-teacher-training/blob/main/app/controllers/candidate_interface/course_choices/provider_selection_controller.rb#L8
# https://github.com/DFE-Digital/apply-for-teacher-training/blob/main/app/forms/candidate_interface/continuous_applications/provider_selection_step.rb#L12
(@provider_cache_key ||= "provider-list-#{Provider.maximum(:updated_at)}") if run_me
### After state
run_me = true
Provider.find_by(code: "EEU").touch if run_me
#<Provider:0x00007fe5365ffd70 id: 2619, name: "University of Ellucian", code: "EEU", created_at: Wed, 24 Feb 2021 12:23:48.431310000 GMT +00:00, updated_at: Thu, 05 Oct 2023 11:35:28.401428000 BST +01:00, region_code: nil, postcode: "", provider_type: "university", latitude: nil, longitude: nil, vendor_id: nil>
### Seems to solved the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment