From 1d69b88e2ecf852c2db51fdf4d7d7f93d07a5851 Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 26 Aug 2010 12:17:35 -0700 Subject: [PATCH 1/4] to id so that change of group works --- app/models/group.rb | 2 +- app/models/user.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/group.rb b/app/models/group.rb index 432ff697c..ae33ada7b 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -21,7 +21,7 @@ class Group end def posts_by_person_id( id ) - id = ensure_bson id + id = id.to_id posts.detect{|x| x.person.id == id } end end diff --git a/app/models/user.rb b/app/models/user.rb index e43f44f51..53a5e4a32 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -51,7 +51,7 @@ class User puts posts_to_move.inspect to_group.people << friend to_group.posts << posts_to_move - from_group.person_ids.delete(ensure_bson(friend.id)) + from_group.person_ids.delete(friend.id.to_id) posts_to_move.each{ |x| from_group.post_ids.delete(x.id)} from_group.save to_group.save From 3554de48d858fbc19b6ac7000510ea5db3743153 Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 26 Aug 2010 12:24:53 -0700 Subject: [PATCH 2/4] trying image url --- app/views/groups/edit.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index d6e227b5f..9ccdd3a65 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -16,6 +16,7 @@ stuff -for person in group.people %li.person + = image_tag person.profile.image_url unless person.profile.image_url.nil? = person.real_name From df74020a16dc2e7f33ad03792511906a050848c7 Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 26 Aug 2010 12:27:10 -0700 Subject: [PATCH 3/4] small thumbnail --- app/views/groups/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 9ccdd3a65..e3547a827 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -16,7 +16,7 @@ stuff -for person in group.people %li.person - = image_tag person.profile.image_url unless person.profile.image_url.nil? + = image_tag person.profile.image_url(:thumb_small) unless person.profile.image_url.nil? = person.real_name From 915144e08b120fdec98b8a3f86c0ba9957e91b45 Mon Sep 17 00:00:00 2001 From: ilya Date: Thu, 26 Aug 2010 12:32:14 -0700 Subject: [PATCH 4/4] size 30 by 30 --- app/views/groups/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index e3547a827..c8e3e4fc4 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -16,7 +16,7 @@ stuff -for person in group.people %li.person - = image_tag person.profile.image_url(:thumb_small) unless person.profile.image_url.nil? + = image_tag (person.profile.image_url(:thumb_small),:size => "30x30") unless person.profile.image_url.nil? = person.real_name