On 16 March 2016 at 08:05, Naveed Alam wrote:
>>
>> Why are you not using Roster.Duty.where(...)?
>>
>> Colin
>
> Thanks dear it worked, I just changed
>
> @theday =Time.now.strftime('%A').downcase
>
> to this
> @theday =Time.now.strftime('%w')
Does Time.now.wday not work?
One thing to watch out
>
> Why are you not using Roster.Duty.where(...)?
>
> Colin
Thanks dear it worked, I just changed
@theday =Time.now.strftime('%A').downcase
to this
@theday =Time.now.strftime('%w')
and the condition line as you suggested to this
@rosterduties = RosterDuty.find(:all, :conditions => ["(duty_day1
2 matches
Mail list logo