2013-02-01 07:06:13 +00:00
|
|
|
class MacLogsController < ApplicationController
|
2013-02-01 10:37:30 +00:00
|
|
|
load_and_authorize_resource :mac_log
|
|
|
|
before_filter :authenticate_user!
|
2013-02-01 07:06:13 +00:00
|
|
|
|
|
|
|
def index
|
|
|
|
@mac_logs = MacLog.desc.limit(1000)
|
2014-06-24 19:20:17 +00:00
|
|
|
@macs = {}
|
|
|
|
@mac_logs.each do |log|
|
|
|
|
@macs.merge!({log.mac => Mac.find_by_mac(log.mac)})
|
|
|
|
end
|
2013-02-01 07:06:13 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|