Skip to content
Extraits de code Groupes Projets
Valider 390bf24e rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

Don't try to put yourself in any groups

parent 435db1ec
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -14,11 +14,9 @@ class PeopleController < ApplicationController
def show
@person = current_user.visible_person_by_id(params[:id])
@profile = @person.profile
@person_groups = current_user.groups_with_person(@person)
@groups_array = current_user.groups.collect{|x| [x.to_s, x.id]}
@groups_with_person = current_user.groups_with_person(@person)
@all_groups = current_user.groups.collect{|x| [x.to_s, x.id]}
@posts = Post.where(:person_id => @person.id, :_id.in => current_user.visible_post_ids).paginate :page => params[:page], :order => 'created_at DESC'
......
......@@ -13,17 +13,15 @@
-unless @posts.first.nil?
%li
%i= "last seen: #{how_long_ago(@posts.first)}"
%li
%i= "friends since: #{how_long_ago(@person)}"
%li
="groups: #{@person_groups}"
= "edit"
= @groups_array.inspect
= form_tag move_person_path
= select :to, :to, @groups_array
= hidden_field_tag :from, :from, :value => @person_groups.first.id
= hidden_field_tag :friend_id, :friend_id, :value => @person.id
= submit_tag "save"
- unless @person == current_user.person
%li
%i= "friends since: #{how_long_ago(@person)}"
%li
= form_tag move_person_path
= select :to, :to, @all_groups
= hidden_field_tag :from, :from, :value => @groups_with_person.first.id
= hidden_field_tag :friend_id, :friend_id, :value => @person.id
= submit_tag "save"
%li
url:
= @person.url
......
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