scope:with_builds_enabled,->{joins('LEFT JOIN project_features ON projects.id = project_features.project_id').where('project_features.builds_access_level IS NULL or project_features.builds_access_level > 0')}
scope:with_issues_enabled,->{joins('LEFT JOIN project_features ON projects.id = project_features.project_id').where('project_features.issues_access_level IS NULL or project_features.issues_access_level > 0')}
scope:with_wiki_enabled,->{joins('LEFT JOIN project_features ON projects.id = project_features.project_id').where('project_features.wiki_access_level IS NULL or project_features.wiki_access_level > 0')}
=======
scope:with_project_feature,->{joins('LEFT JOIN project_features ON projects.id = project_features.project_id')}
# "enabled" here means "not disabled". It includes private features!
...
...
@@ -244,6 +239,7 @@ class Project < ActiveRecord::Base