add to_date so its more explicit

This commit is contained in:
Sam Saffron 2013-02-11 09:11:02 +11:00
parent 1264f628c8
commit 8250586306
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ class Admin::UsersController < Admin::AdminController
def index
# Sort order
if params[:query] == "active"
@users = User.order("COALESCE(last_seen_at, '1970-01-01') DESC, username")
@users = User.order("COALESCE(last_seen_at, to_date('1970-01-01', 'YYYY-MM-DD')) DESC, username")
else
@users = User.order("created_at DESC, username")
end