From 47df0b296b282d0fe554c3b596b366c5403c9588 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 17 Oct 2017 14:05:59 +0200 Subject: feat: sort invite codes by last update They used to be sorted by the code which was not helpful fixes #8806 requires deploy of new design docs to the platform --- app/controllers/invite_codes_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/controllers/invite_codes_controller.rb') diff --git a/app/controllers/invite_codes_controller.rb b/app/controllers/invite_codes_controller.rb index 6a7fef3..96836ee 100644 --- a/app/controllers/invite_codes_controller.rb +++ b/app/controllers/invite_codes_controller.rb @@ -7,7 +7,9 @@ class InviteCodesController < ApplicationController def index @invite = InviteCode.new # for the creation form. - @invites = InviteCode.all.page(params[:page]).per(APP_CONFIG[:pagination_size]) + @invites = InviteCode.by_updated_at.descending. + page(params[:page]). + per(APP_CONFIG[:pagination_size]) respond_with @invites end -- cgit v1.2.3