activescaffold/active_scaffold — pull request #320 by dovadi (2013-12-16 19:22:25+00:00)
Title: Add primary key to 'ORDER BY' clause, because with POSTGRES rows are ret...

Add primary key to 'ORDER BY' clause, because with POSTGRES rows are returned in a not deterministic way if sorting field is not unique.

For further explanation of this unexpected behavior see:

http://www.postgresql.org/message-id/4A0C62B1.1060208@etf.bg.ac.yu and
http://stackoverflow.com/questions/11904766/strange-ordering-bug-is-it-a-bug-in-postgres-when-ordering-two-columns-with-i