Class: Admin::WeeklyTimeReportController
- Inherits:
-
BaseController
- Object
- BaseController
- Admin::WeeklyTimeReportController
- Defined in:
- app/controllers/admin/weekly_time_report_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
2 3 4 |
# File 'app/controllers/admin/weekly_time_report_controller.rb', line 2 def index redirect_to('/admin/weekly_time_report/' + Date.current.beginning_of_week.strftime("%F")) end |
#show ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/admin/weekly_time_report_controller.rb', line 6 def show redirect_unless_monday('/admin/weekly_time_report/', params[:id]) @users = User.sort_by_name.select{|u| u.has_role?(:developer) && !u.locked } @weekly_hours_sum = ChartData.external_hours_for_chart(@users, :date => @start_date) end |