christopherjkim/natf2 — comment on commit f6cb27cd4241b6b4610ad40e4cfa55c89f2c7ca0
File: app/models/stream.rb line 12
By qpingu:

Better written as:

current_viewers = response["streams"]["stream"]["channel_count"] rescue nil
self.update_attributes(:viewers => current_viewers, :live => !!current_viewers)