summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorazul <azul@riseup.net>2017-10-21 08:06:26 +0000
committerazul <azul@riseup.net>2017-10-21 08:06:26 +0000
commit92c5e35ea50a9d64f89d56454eff3e3103c17dc2 (patch)
treeb30e6372edca16a2fb15696bbe6a497468aa8887 /app/controllers
parent3cf07b870cf5fa20714dadec38680876b0657108 (diff)
parent47df0b296b282d0fe554c3b596b366c5403c9588 (diff)
Merge branch 'feat/8806-sort-invite-codes' into 'master'
feat: sort invite codes by last update Closes #8806 See merge request leap/webapp!48
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/invite_codes_controller.rb4
1 files changed, 3 insertions, 1 deletions
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