Given that I have a Foo model w/ the standard Rails timestamp columns what would be the most efficient way to calculate the average number of days between records being created?
Given that I have a Foo model w/ the standard Rails timestamp columns what
Share
The
maximumandminimumclass methods of your model will use the SQL aggregate functionsmin()andmax()to find the extreme values efficiently.