Skip to content

Commit

Permalink
Fix failing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
notmarkmiranda committed Aug 3, 2018
1 parent 5803320 commit e2e8b98
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/league.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class League < ApplicationRecord
delegate :count, to: :players, prefix: true

def average_players_per_game
return 0.0 if games_count.zero?
(players_count.to_f / games_count * 100).floor / 100.0
end

Expand Down

0 comments on commit e2e8b98

Please sign in to comment.