remove unnecessary code from people_controller#contacts and use #each in view
This commit is contained in:
parent
e76935daaf
commit
c1eb986f5b
2 changed files with 1 additions and 3 deletions
|
|
@ -146,8 +146,6 @@ class PeopleController < ApplicationController
|
|||
@aspect = :profile
|
||||
@contacts_of_contact = @contact.contacts.paginate(:page => params[:page], :per_page => (params[:limit] || 15))
|
||||
@hashes = hashes_for_people @contacts_of_contact, @aspects
|
||||
@aspects_with_person = @contact.aspects
|
||||
@aspect_ids = @aspects_with_person.map(&:id)
|
||||
else
|
||||
flash[:error] = I18n.t 'people.show.does_not_exist'
|
||||
redirect_to people_path
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@
|
|||
= render 'people/sub_header', :person => @person, :contact => @contact
|
||||
|
||||
#people_stream.stream
|
||||
- for hash in @hashes
|
||||
- @hashes.each do |hash|
|
||||
= render :partial => 'people/person', :locals => hash
|
||||
= will_paginate @contacts_of_contact
|
||||
|
|
|
|||
Loading…
Reference in a new issue