Last active
November 25, 2018 19:09
-
-
Save talum/7d45d401e93c058a21612a10890e5c9d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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