class StaticController < ApplicationController
  def homepage
    @projects = Project.limit(200).sample(14).sort_by(&:name)
    @users = User.order('pull_requests_count desc').limit(200).sample(45)
    @pull_requests = PullRequest.year(current_year).order('created_at desc').limit(5)
    @quote = Quote.random
  end

  def about
    @collaborators = User.collaborators
  end
end

class StaticController < ApplicationController
  def homepage
    @projects = Project.active.limit(200).sample(14).sort_by(&:name)
    @users = User.order('pull_requests_count desc').limit(200).sample(45)
    @pull_requests = PullRequest.year(current_year).order('created_at desc').limit(5)
    @quote = Quote.random
  end

  def about
    @collaborators = User.collaborators
  end
end

Use active scope to retrieve projects for homepage
Use active scope to retrieve projects for homepage

- Ref Issue 405 (https://github.com/andrew/24pullrequests/issues/405)
