Skip to content

Commit

Permalink
Small change at frontpage_controller to prevent errors when there's n…
Browse files Browse the repository at this point in the history
…o valid BBB server configure.
  • Loading branch information
daronco committed Jul 25, 2011
1 parent 8d272c7 commit 1538b00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/frontpage_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ def index

# Fetch the meetings running in the server and order by participant_count
# TODO Temporarily using the first server
@stats = {}
@running_spaces = []
@popular_spaces = []

@server = BigbluebuttonServer.first
begin
@server.fetch_meetings

# statistics
@stats = {}
@stats[:meetings] = @server.meetings.select { |m| m.is_running? }.count
@stats[:users] = User.count
@stats[:spaces] = Space.count
Expand Down

0 comments on commit 1538b00

Please sign in to comment.