Displaying 1 result from an estimated 1 matches for "find_by_daterange".
2007 Apr 09
1
help with ActiveRecord joins
...-1) + 7)
))
OR events.id IN (SELECT event_id FROM occurrences WHERE startdate =
start_date)
(the DATEPART function is sqlserver-specific, works like DAYOFWEEK() and
DAYOFMONTH() in mysql)
I''m wondering the best way to use this query in ActiveRecord. Would it
be better to write an Event.find_by_daterange method that uses find with
a manual :joins options, or using find_by_sql, or create view which
encapsulates this query and do queries on a corresponding model object?
Thanks for any advice.
- donald
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are s...