added a new vulnerability plus completed the work info page

This commit is contained in:
Ken Johnson
2013-05-31 11:41:54 -04:00
parent 97ca13632d
commit f8e21af3e0
4 changed files with 91 additions and 1 deletions
+1
View File
@@ -1,5 +1,6 @@
class WorkInfoController < ApplicationController
def index
@user = current_user
end
end
+7 -1
View File
@@ -1,4 +1,10 @@
class WorkInfo < ActiveRecord::Base
attr_accessible :DoB, :SSN, :bonuses, :income, :user_id, :years_worked
attr_accessible :DoB, :SSN, :bonuses, :income, :years_worked
belongs_to :user
# We should probably use this
def last_four
"***-**-" << self.SSN[-4,4]
end
end
+41
View File
@@ -0,0 +1,41 @@
<div class="dashboard-wrapper">
<div class="main-container">
<div class="row-fluid">
<div class="span12">
<div class="widget">
<div class="widget-header">
<div class="title">
<span class="fs1" aria-hidden="true" data-icon="&#xe088;"></span> Employee Information
</div>
</div>
<div class="widget-body">
<table class="table table-bordered table-striped">
<thead>
<tr>
<th style="width:16%">Full Name</th>
<th style="width:16%">Income</th>
<th style="width:16%">Bonuses</th>
<th style="width:16%">Years w/ MetaCorp</th>
<th style="width:16%">SSN</th>
<th style="width:16%">DoB</th>
</tr>
</thead>
<tbody>
<tr>
<td><%= "#{@user.first_name} #{@user.last_name}" %></td>
<td><%= @user.work_info.income %></td>
<td><%= @user.work_info.bonuses %></td>
<td><%= @user.work_info.years_worked %></td>
<td><%= @user.work_info.SSN %></td>
<td><%= @user.work_info.DoB %></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>