diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-05 14:20:55 -0800 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-02-05 14:20:55 -0800 |
commit | 62ed1c537e9b8aa85d354b377f18083fb71b8e05 (patch) | |
tree | a1b75f804b2e9384190f9d591a2f2701ea8d31db /app/controllers/admin/dashboard_controller.rb | |
parent | dbca8c97588d1fcc4155b079eb54157991be3aa7 (diff) | |
download | gitlab-ce-62ed1c537e9b8aa85d354b377f18083fb71b8e05.tar.gz |
Explicitly define ordering in models using default_scope
Diffstat (limited to 'app/controllers/admin/dashboard_controller.rb')
-rw-r--r-- | app/controllers/admin/dashboard_controller.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index be19139c9b1..c491e5c7550 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -1,7 +1,7 @@ class Admin::DashboardController < Admin::ApplicationController def index - @projects = Project.order("created_at DESC").limit(10) - @users = User.order("created_at DESC").limit(10) - @groups = Group.order("created_at DESC").limit(10) + @projects = Project.limit(10) + @users = User.limit(10) + @groups = Group.limit(10) end end |