I have a model, Day, and the table, ‘days’, contains 10,000 day records
each with a field, ‘date’, which has a ruby date object matched to a
mysql date type, YYYY-MM-DD. I would like my controller to paginate Day
by day.date.year. How do I do this? In other words, on each page, I
want EITHER 365 records or 366 depending on whether or not it is a leap
year–I want all of the days for a single year displayed on each page.
Any idea how to accomplish this?