Skip to content
Extraits de code Groupes Projets
Valider d84b0c58 rédigé par Steven Fuchs's avatar Steven Fuchs
Parcourir les fichiers

simplify search results processing since only one person can be returned

parent 9de477cf
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -48,13 +48,10 @@ class PeopleController < ApplicationController
@people = Person.where(:diaspora_handle => search_query.downcase)
@answer_html = ""
unless @people.empty?
@people = @people.paginate(:page => params[:page], :per_page => 15)
@hashes = hashes_for_people(@people, @aspects)
self.formats = self.formats + [:html]
@hashes.each do |hash|
@answer_html += render_to_string :partial => 'people/person', :locals => hash
end
@answer_html = render_to_string :partial => 'people/person', :locals => @hashes.first
end
render :json => { :search_count => @people.count, :search_html => @answer_html }.to_json
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter