We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0dc83c1 commit 46ec84bCopy full SHA for 46ec84b
1 file changed
app/controllers/contacts_controller.rb
@@ -5,15 +5,17 @@ class ContactsController < ApplicationController
5
6
# GET /contacts/user
7
def user
8
- @contacts =
9
- current_user.contacts.paginate(page: params[:page], per_page: 30)
+ @contacts = current_user
+ .contacts.order(created_at: :asc)
10
+ .paginate(page: params[:page], per_page: 30)
11
render :index
12
end
13
14
# GET /publications/1/contacts
15
def index
16
- @publication.contacts.paginate(page: params[:page], per_page: 30)
+ @contacts = @publication
17
18
19
20
21
# GET /publications/1/contacts/1
0 commit comments