Sort order for files confusing when end dates the same
@versions = @project.versions.sort.reverse
It appears that project.versions sorts by date, not by name. That is not necessarily the problem. But it is a problem when multiple versions have the same end date. The net result of that, in the above situation, is that within a given date, the projects sort approximately ascending (oldest first), but between multiple dates, they sort descending (newest first), as desired. I say "approximately ascending" because there are a few versions that are out of place, both in the Roadmap screen and the Files screen.
As I'm importing files from Trac, I happen to be setting up a bunch of versions with today's end date.
I have no idea why this is happening, but if I were to venture a guess, I'd say Ruby has a feature where a custom sort ordering can be imposed on a type, and versions sort order is creating this behavior.