Displaying 1 result from an estimated 1 matches for "contract1_schedul".
Did you mean:
contract1_schedule
2007 Sep 06
2
HABTM Loops
...each worker with an asterisk symbol in
the weekly view. For example,
PEOPLE WORKING
Sunday
===========
12:00 am: **
1:00 am: *****
2:00 am: ******
3:00 am: ******
etc..
How can I create a loop that can replace my extremely un-DRY queries
in my controller?
# Controller #######################
@contract1_schedules = Hour.find(1).schedules.find(:all, :conditions
=> "week = ''#{@woy}''")
@contract2_schedules = Hour.find(2).schedules.find(:all, :conditions
=> "week = ''#{@woy}''")
@contract3_schedules = Hour.find(3).schedules.find(:all, :conditions
=&g...