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 via http://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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---