Sort submissions by latest
This commit is contained in:
parent
2a59c19a38
commit
a5be6af3f7
2
Gemfile
2
Gemfile
@ -30,7 +30,7 @@ gem 'rack-cors'
|
||||
gem 'sentry-raven'
|
||||
gem 'sequenced'
|
||||
gem 'sorcery'
|
||||
gem 'pagy', '~> 3.8'
|
||||
gem 'pagy'
|
||||
|
||||
group :development, :test do
|
||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||
|
@ -269,7 +269,7 @@ DEPENDENCIES
|
||||
jbuilder
|
||||
listen
|
||||
lockbox
|
||||
pagy (~> 3.8)
|
||||
pagy
|
||||
pg
|
||||
puma
|
||||
rack-cors
|
||||
|
@ -10,7 +10,7 @@ class FormsController < ApplicationController
|
||||
|
||||
def show
|
||||
@form = current_user.forms.find_by!(token: params[:id])
|
||||
@pagy, @submissions = pagy(@form.submissions, items: 25)
|
||||
@pagy, @submissions = pagy(@form.submissions.order(created_at: :desc), items: 25)
|
||||
end
|
||||
|
||||
def index
|
||||
|
Loading…
x
Reference in New Issue
Block a user