Hi everyone,
I have stored two dates with a tournament model in the database
"registration_accepted_from_date" and
"registration_accepted_to_date".
In the search form with a single checkbox i want to find all
tournaments where registration is currently open, meaning, where
Time.now lies within the range of those two stored dates.
#my indexing should be straight forward:
define_index do
has registration_accepted_from_date
has registration_accepted_to_date
end
Now what? :-) I know how to search a single date field in the database
with a range composed of two dates, e.g. from a form. But how does
the opposite work: you have the two dates already stored in the
database and want to check if a single date (e.g. Time.now) lies
within the range of those stored dates?
Hints are appreciated :-)
greets
-act
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" 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/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---