Älphä Blüë wrote:
> And then defined that in a per search scope:
>
> named_scope :compiled_week_one, lambda { { :conditions => ['compiled_on
>> ? and compiled_on < ?', WEEK_TWO_START, WEEK_TWO_END] } }
>
Actually reads WEEK_ONE_START and WEEK_ONE_END..
--
Posted via http://www.ruby-forum.com/
Matt, good call there mate.
I created some constants for each week start and end:
WEEK_ONE_START = "2009-06-21"
WEEK_ONE_END = "2009-06-27"
And then defined that in a per search scope:
named_scope :compiled_week_one, lambda { { :conditions => ['compiled_on
> ? and compiled_on < ?', WEEK_TWO_S
One thing - if you're only ever going to be interested in the date,
I'd recommend changing the compiled_on field to a date, rather than a
datetime. That will eliminate the "off by 1 second" thing you're
seeing.
--Matt Jones
On Jun 28, 9:02 am, "Älphä Blüë"
wrote:
> I was playing around with di
I was playing around with distinct and tried the following:
<%= collection_select(:rushing_offense, :compiled_on,
RushingOffense.find(:all, :select => 'DISTINCT compiled_on'), :id,
:compiled_on, {:prompt => true}) %>
With my current week's data for instance there are 120 timestamps.
Using th
4 matches
Mail list logo