Sha256: 0b366278b17683de1ad16ccc662526ced8f5919d3e424d2b39a7d74f64387d36
Contents?: true
Size: 495 Bytes
Versions: 3
Compression:
Stored size: 495 Bytes
Contents
class TimesheetsController < ApplicationController def index @employee = Employee.find(params[:employee_id]) WorkDay.create_or_update_upto(@employee, Date.today.end_of_month) range = Date.today.beginning_of_month..Date.today.end_of_month @work_days = @employee.work_days.where(:date => range) end def start @employee = Employee.find(params[:employee_id]) @employee.work_days.create(:date => params[:timesheet][:duration_from]) redirect_to @employee end end
Version data entries
3 entries across 3 versions & 1 rubygems