Created
April 17, 2016 02:25
-
-
Save adamnengland/28c0aecef23d869f1170f77beb1814aa to your computer and use it in GitHub Desktop.
FMS Usage Report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
out = [] | |
Facility.find_each do |facility| | |
if facility.send(:belong_to_billable_company?) && facility.facility_map.geometric_objects.count > 10 | |
out << "#{facility.company.name}, #{facility.name} has #{facility.facility_map.geometric_objects.count} objects" | |
end | |
end | |
facilities_receiving_texts = SMSReceivedEvent.pluck(:facility_id).uniq.length | |
facilities_sending_texts = SMSSentEvent.pluck(:facility_id).uniq.length | |
sms_received = SMSReceivedEvent.count | |
sms_sent = SMSSentEvent.count | |
ap "#{out.length} facilities are using maps" | |
ap "#{sms_received} SMS Sent by #{facilities_receiving_texts} facilities" | |
ap "#{sms_sent} SMS Sent by #{facilities_sending_texts} facilities" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment