photos on the profile edit page now are only your photos, for now. also, no more remove friend button on your profile page

This commit is contained in:
maxwell 2010-08-19 10:20:43 -07:00
parent 8131e413a4
commit af8448dd51
2 changed files with 5 additions and 6 deletions

View file

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

View file

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