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üë" <rails-mailing-l...@andreas-s.net>
wrote:
> 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 the above, it pulled 2 options only (which is not bad but also not
> good).  The difference was within a second apart:
>
> Please Select--
> 2009-06-28 12:08:40 UTC
> 2009-06-28 12:08:41 UTC
>
> Probably because it took a second to load the batch.  I would rather
> work with something like this but tailor it some more..
>
> I'll see what I can work out but if anyone has better ideas please let
> me know.
>
> thanks.
>
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to