Permalink
Browse files

Only return the teams playing in the playoffs for the index call

  • Loading branch information...
1 parent 163c4e5 commit 444eeeae0090fd47ea822f0906ebbcaeff0261c1 @nmunson committed Mar 31, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/controllers/teams_controller.rb
@@ -3,7 +3,7 @@ class TeamsController < ApplicationController
respond_to :json
def index
- @teams = Team.all
+ @teams = Team.all.select{|team| team.players.count > 0}
respond_with(@teams, :except => [:created_at, :updated_at])
end

0 comments on commit 444eeea

Please sign in to comment.