remove unnecessary code from people_controller#contacts and use #each in view

This commit is contained in:
Fabián Rodríguez 2013-02-08 21:22:12 -02:00
parent e76935daaf
commit c1eb986f5b
2 changed files with 1 additions and 3 deletions

View file

@ -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

View file

@ -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