diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 10db48c04..c93c474fc 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -16,8 +16,9 @@ class UsersController < ApplicationController def edit @user = User.first(:id => params[:id]) + @person = @user.person @profile = @user.profile - @photos = Photo.paginate :page => params[:page], :order => 'created_at DESC' + @photos = Photo.where(:person_id => @person.id).paginate :page => params[:page], :order => 'created_at DESC' end def update @@ -30,7 +31,4 @@ class UsersController < ApplicationController render :action => 'edit' end end - - - -end +end diff --git a/app/views/people/show.html.haml b/app/views/people/show.html.haml index af8eb86ab..39c60ec7e 100644 --- a/app/views/people/show.html.haml +++ b/app/views/people/show.html.haml @@ -5,7 +5,8 @@ %h1 = @person.real_name - - unless @person.id == current_user.id + - unless @person.id == current_user.person.id + .right = link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete, :class => "button"