Merge pull request #5335 from svbergerem/paginate-contacts
Paginate contacts
This commit is contained in:
commit
30de98cf3e
2 changed files with 3 additions and 3 deletions
|
|
@ -65,7 +65,7 @@ class ContactsController < ApplicationController
|
|||
relation.includes(:person => :profile).to_a.tap {|contacts|
|
||||
contacts.sort_by! {|contact| contact.person.name }
|
||||
}
|
||||
}.inject(:+)
|
||||
}.inject(:+).paginate(:page => params[:page], :per_page => 25)
|
||||
end
|
||||
|
||||
def set_up_contacts_mobile
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@
|
|||
= render 'contacts/header'
|
||||
|
||||
- if @contacts_size > 0
|
||||
- @contacts.each do |contact|
|
||||
= render 'contacts/contact', :contact => contact
|
||||
= render @contacts
|
||||
= will_paginate @contacts
|
||||
- else
|
||||
.no_contacts
|
||||
%h3
|
||||
|
|
|
|||
Loading…
Reference in a new issue