mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-09 15:18:11 -05:00
Move contact pagination to controller - fixes #2760
This commit is contained in:
@@ -19,7 +19,7 @@ class ContactsController < ApplicationController
|
||||
current_user.contacts.receiving
|
||||
end
|
||||
end
|
||||
@contacts = @contacts.for_a_stream(params[:page])
|
||||
@contacts = @contacts.for_a_stream.paginate(:page => params[:page], :per_page => 25)
|
||||
|
||||
respond_to do |format|
|
||||
format.json {
|
||||
|
||||
@@ -37,10 +37,9 @@ class Contact < ActiveRecord::Base
|
||||
where(:receiving => true)
|
||||
}
|
||||
|
||||
scope :for_a_stream, lambda { |page|
|
||||
scope :for_a_stream, lambda {
|
||||
includes(:aspects, :person => :profile).
|
||||
order('profiles.last_name ASC').
|
||||
paginate(:page => page, :per_page => 25)
|
||||
order('profiles.last_name ASC')
|
||||
}
|
||||
|
||||
scope :only_sharing, lambda {
|
||||
|
||||
Reference in New Issue
Block a user