%= form_for(@mac) do |f| %>
  <% if @mac.errors.any? %>
    
      <%= pluralize(@mac.errors.count, "error") %> prohibited this MAC from being saved:
      
      <% @mac.errors.full_messages.each do |msg| %>
        - <%= msg %>
 
      <% end %>
      
     
  <% end %>
  
    <%= f.label :user_id, "User" %>
    <%= collection_select(:mac, :user_id, @users, :id, :name, :include_blank => true) %>
  
  
    <%= f.label :mac %>
    <%= f.text_field :mac, :value => (@mac.mac || @arp || nil) %>
    <% if @arp.present? %>
Autodetected from your IP of <%= @ip %><% end %>
  
  
    <%= f.label :note %>
    <%= f.text_field :note %>
  
  
    <%= f.label :hidden %>
    <%= f.check_box :hidden %>
  
  
    <%= f.submit %>
  
<% end %>