Adjusting wording and stat counts

This commit is contained in:
2013-10-02 04:57:46 -07:00
parent 370c82e075
commit 0eeaddabd7
4 changed files with 14 additions and 2 deletions

View File

@@ -90,6 +90,7 @@ end
# GET /macs/1.json
def show
@mac = Mac.find(params[:id])
@mac_logs = MacLog.where(:mac => @mac.mac)
respond_to do |format|
format.html # show.html.erb

View File

@@ -17,7 +17,7 @@ class StatisticsController < ApplicationController
}
@door_log_graph = []
@door_logs.group_by{|l| l.created_at.beginning_of_day}.each{|l| @door_log_graph << [l.first.to_time.to_i*1000,l.last.size]}
@door_logs.where("key = 'G'").group_by{|l| l.created_at.beginning_of_day}.each{|l| @door_log_graph << [l.first.to_time.to_i*1000,l.last.size]}
respond_to do |format|
format.html