Re: [Rails] Re: Re: Re: Re: Re: Find Weekdays range between two

2016-03-16 Thread Colin Law
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

[Rails] Re: Re: Re: Re: Re: Find Weekdays range between two

2016-03-16 Thread Naveed Alam
> > 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