Open-Source-Access-Control-.../app/controllers/mac_logs_controller.rb

14 lines
278 B
Ruby
Raw Normal View History

class MacLogsController < ApplicationController
load_and_authorize_resource :mac_log
before_filter :authenticate_user!
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
end
end