Adding pamela but I'm dumb and messed up routing

This commit is contained in:
2013-01-31 20:33:40 -07:00
parent 6673573e36
commit a7e999614c
21 changed files with 364 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
<%= form_for(@mac) do |f| %>
<% if @mac.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@mac.errors.count, "error") %> prohibited this Mac from being saved:</h2>
<ul>
<% @mac.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= f.label :user_id, "User" %><br />
<%= collection_select(:mac, :user_id, @users, :id, :name) %>
</div>
<div class="field">
<%= f.label :mac, "Mac" %><br />
<%= f.text_field :mac %>
</div>
<div class="actions">
<%= f.submit %>
</div>
<% end %>

View File

@@ -0,0 +1,6 @@
<h1>Editing User Certification</h1>
<%= render 'form' %>
<%= link_to 'Show', @user_certification %> |
<%= link_to 'Back', user_certifications_path %>

View File

@@ -0,0 +1,9 @@
<h2>What machines are on our network?</h2>
<% @macs.each do |mac| %>
<%= mac.user.name unless mac.user.blank? %>
<%= mac.mac %> <!--
<%= mac.since %>,
<%= mac.refreshed %>,
<%= mac.active %>--> |
<%= link_to 'Edit', edit_mac_path(mac) %> <br/>
<% end %>

View File

@@ -0,0 +1,5 @@
<h1>New User Certification</h1>
<%= render 'form' %>
<%= link_to 'Back', user_certifications_path %>

View File

@@ -0,0 +1,5 @@
Scanning...
<% @log.each do |log| %>
<%= log.mac %> =
<%= log.ip %><br/>
<% end %>