Port to support postgresql.

This commit is contained in:
Martin Edenhofer 2016-01-24 19:27:36 +01:00
parent 70f5f21558
commit ab63cfec4d

View file

@ -41,7 +41,7 @@ class RecentView < ApplicationModel
.order('created_at DESC, id DESC')
.limit(limit)
else
RecentView.select('DISTINCT(o_id), recent_view_object_id').where( created_by_id: user.id, recent_view_object_id: ObjectLookup.by_name(type) )
RecentView.select('DISTINCT(o_id), recent_view_object_id, created_at, id').where(created_by_id: user.id, recent_view_object_id: ObjectLookup.by_name(type))
.order('created_at DESC, id DESC')
.limit(limit)
end