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

2016-03-14 Thread Colin Law
On 14 March 2016 at 11:56, Naveed Alam wrote: >>> Colin >> > > Dear I changed the Days from names to numbers, in my Add_rosters its > like below now: > > <%= a.select :duty_day1, [[ "Monday","1"], > ["Tuesday","2"],["Wednesday","3"],["Thursday","4"],["Friday","5"],["Saturday","6"],["Sunday","0"]],

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

2016-03-14 Thread Naveed Alam
>> Colin > Dear I changed the Days from names to numbers, in my Add_rosters its like below now: <%= a.select :duty_day1, [[ "Monday","1"], ["Tuesday","2"],["Wednesday","3"],["Thursday","4"],["Friday","5"],["Saturday","6"],["Sunday","0"]],:selected => ["Monday","1"] %> Change the controller

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

2016-03-13 Thread Naveed Alam
> "(duty_day1 <= duty_day2 and duty_day1 <= ? and duty_day2 >= ?) or > (duty_day1 > duty_day2 and (duty_day1 <= ? or duty_day2 >= ?))", > today, today, today, today > I have not tested that so convince yourself it is right before trying > it. Don't forget to provide automated tests to check all th