From 82505863064b8230bd5ee2f14cac6641dccd0152 Mon Sep 17 00:00:00 2001 From: Sam Saffron Date: Mon, 11 Feb 2013 09:11:02 +1100 Subject: [PATCH] add to_date so its more explicit --- app/controllers/admin/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/users_controller.rb b/app/controllers/admin/users_controller.rb index 910f8aa041a..a378f907997 100644 --- a/app/controllers/admin/users_controller.rb +++ b/app/controllers/admin/users_controller.rb @@ -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