mirror of
https://github.com/diaspora/diaspora.git
synced 2026-01-09 15:18:11 -05:00
added aspect filtering to contact index. fixed rspec
This commit is contained in:
@@ -11,7 +11,9 @@ class ContactsController < ApplicationController
|
||||
@all_contacts_count = current_user.contacts.count
|
||||
@my_contacts_count = current_user.contacts.receiving.count
|
||||
|
||||
unless params[:set] == "all"
|
||||
if params["a_id"]
|
||||
@contacts = current_user.aspects.find(params["a_id"]).contacts.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25)
|
||||
elsif params[:set] != "all"
|
||||
@contacts = current_user.contacts.receiving.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25)
|
||||
else
|
||||
@contacts = current_user.contacts.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25)
|
||||
|
||||
Reference in New Issue
Block a user