Figured out mac saving issue
This commit is contained in:
		
							parent
							
								
									048ce52111
								
							
						
					
					
						commit
						998558cd30
					
				@ -1,4 +1,4 @@
 | 
				
			|||||||
class Mac < ActiveRecord::Base
 | 
					class Mac < ActiveRecord::Base
 | 
				
			||||||
  belongs_to :user
 | 
					  belongs_to :user
 | 
				
			||||||
  attr_accessible :active, :ip, :mac, :refreshed, :since
 | 
					  attr_accessible :active, :ip, :mac, :refreshed, :since, :user_id
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<h2>What machines are on our network?</h2>
 | 
					<h2>What machines are on our network?</h2>
 | 
				
			||||||
<% @macs.each do |mac| %>
 | 
					<% @macs.each do |mac| %>
 | 
				
			||||||
  <%= mac.user.name unless mac.user.blank? %>  
 | 
					  <%= mac.user.name unless mac.user.blank? %>  
 | 
				
			||||||
  <%= mac.mac %> <!-- 
 | 
					  <%= mac.mac if mac.user.blank? %> <!-- 
 | 
				
			||||||
  <%= mac.since %>, 
 | 
					  <%= mac.since %>, 
 | 
				
			||||||
  <%= mac.refreshed %>,
 | 
					  <%= mac.refreshed %>,
 | 
				
			||||||
  <%= mac.active %>--> |
 | 
					  <%= mac.active %>--> |
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user