added the PTO section

This commit is contained in:
Ken Johnson
2013-05-24 20:54:07 -04:00
parent 3fb341553c
commit af763d40bf
14 changed files with 119 additions and 12 deletions
@@ -0,0 +1,5 @@
class PaidTimeOffController < ApplicationController
def index
end
end
+2
View File
@@ -0,0 +1,2 @@
module PaidTimeOffHelper
end
+5
View File
@@ -0,0 +1,5 @@
class PaidTimeOff < ActiveRecord::Base
attr_accessible :pto_earned, :pto_taken, :sick_days_earned, :sick_days_taken, :user_id
belongs_to :user
end
+1
View File
@@ -11,6 +11,7 @@ class User < ActiveRecord::Base
attr_accessor :skip_user_id_assign
before_save :assign_user_id, :on => :create
has_one :retirement, :foreign_key => :user_id, :primary_key => :user_id
has_one :paid_time_off, :foreign_key => :user_id, :primary_key => :user_id
+2 -2
View File
@@ -35,12 +35,12 @@
<% end %>
</li>
<li>
<a href="#">
<%= link_to user_paid_time_off_index_path(:user_id => current_user.user_id) do %>
<div class="icon">
<span class="fs1" aria-hidden="true" data-icon="&#xe0d2;"></span>
</div>
PTO
</a>
<% end %>
</li>
<li>
<a href="#">