Class: HrLite::LeaveBalancesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- HrLite::LeaveBalancesController
- Defined in:
- app/controllers/hr_lite/leave_balances_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
3 4 5 6 7 8 9 |
# File 'app/controllers/hr_lite/leave_balances_controller.rb', line 3 def index year = params[:year].to_i @year = year.between?(2000, 2100) ? year : LeaveYear.current_key @balances = LeaveType.active.where(paid: true).where.not(annual_quota: nil).map do |type| LeaveBalance.for(hr_current_user, type, @year) end end |