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 'sentry-raven'
|
||||||
gem 'sequenced'
|
gem 'sequenced'
|
||||||
gem 'sorcery'
|
gem 'sorcery'
|
||||||
gem 'pagy', '~> 3.8'
|
gem 'pagy'
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
|
||||||
|
@ -269,7 +269,7 @@ DEPENDENCIES
|
|||||||
jbuilder
|
jbuilder
|
||||||
listen
|
listen
|
||||||
lockbox
|
lockbox
|
||||||
pagy (~> 3.8)
|
pagy
|
||||||
pg
|
pg
|
||||||
puma
|
puma
|
||||||
rack-cors
|
rack-cors
|
||||||
|
@ -10,7 +10,7 @@ class FormsController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
@form = current_user.forms.find_by!(token: params[:id])
|
@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
|
end
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
Loading…
x
Reference in New Issue
Block a user