set @contacts_of_contact_count in photos#index, thanks LPrelle

This commit is contained in:
MrZYX 2011-05-16 16:21:13 +02:00
parent e338886910
commit 956f0044a9

View file

@ -23,9 +23,11 @@ class PhotosController < ApplicationController
if @contact if @contact
@aspects_with_person = @contact.aspects @aspects_with_person = @contact.aspects
@contacts_of_contact = @contact.contacts @contacts_of_contact = @contact.contacts
@contacts_of_contact_count = @contact.contacts.count
else else
@contact = Contact.new @contact = Contact.new
@contacts_of_contact = [] @contacts_of_contact = []
@contacts_of_contact_count = 0
end end
@posts = current_user.posts_from(@person).where(:type => 'Photo').paginate(:page => params[:page]) @posts = current_user.posts_from(@person).where(:type => 'Photo').paginate(:page => params[:page])