Skip to content

Instantly share code, notes, and snippets.

@vassyz
Last active November 7, 2023 14:20
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 vassyz/c7177bb368d3eea16a34183ea5b03863 to your computer and use it in GitHub Desktop.
Save vassyz/c7177bb368d3eea16a34183ea5b03863 to your computer and use it in GitHub Desktop.
[DfE] 2480-edit-course-status
course = RecruitmentCycle.current.providers.find_by(provider_code: "2BV").courses.find_by(course_code: "2XW3")
course.enrichments.max_by(&:created_at).update(status: "rolled_over", last_published_timestamp_utc: nil)
course.site_statuses.each do |site_status|
site_status.update(vac_status: :full_time_vacancies, status: :new_status, publish: :unpublished)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment