Commit 75aafbfeff920000dc93c0ea3f1287a5537540b9

Authored by Rafael Manzo
1 parent c97f6bc6

Don't list hidden repositories

Showing 1 changed file with 1 additions and 4 deletions   Show diff stats
app/controllers/projects_controller.rb
... ... @@ -14,10 +14,7 @@ class ProjectsController < ApplicationController
14 14 # GET /projects
15 15 # GET /projects.json
16 16 def index
17   - @projects = []
18   - Project.all.each do |project|
19   - @projects << project unless project.attributes.hidden? && current_user != project.attributes.user
20   - end
  17 + @projects = Project.all.select { |project| !project.attributes.hidden }
21 18 end
22 19  
23 20 # POST /projects
... ...