Skip to content

Instantly share code, notes, and snippets.

@talum talum/sti_1b.rb
Last active Nov 25, 2018

Embed
What would you like to do?
# some other caller
def set_projects_progress_status!
project_repo_ids = AssignedRepo.team_projects_for(batch_id: batch.id, track_id: track.id).pluck(:canonical_id)
end
def set_projects_progress_status!
project_repo_ids = AssignedRepo.team_projects_for(batch_id: batch.id, track_id: track.id).canonical_github_repository_ids
end
# Assigned Repo
# app/models/assigned_repo.rb
class AssignedRepo < ActiveRecord::Model
### Omitted
def self.canonical_github_repository_ids
if $rollout.active?(:remove_content)
joins(:canonical_material)
.pluck("course_work_canonical_materials.github_repository_id")
.uniq
else
pluck(:canonical_id)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.