I'd probably make a named_scope as it's not as easy as you might think to
grab a whole year.
named_scope :by_year, lambda { |year|
# prep for conditions here, possibly finding beginning and ending of year
{ :conditions => ... }
}
I can't think of anything specific that would work sql-wise but perhaps
there's some db specific condition that would grab a whole year at once.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" 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/hobousers?hl=en.