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:
parent
8131e413a4
commit
af8448dd51
2 changed files with 5 additions and 6 deletions
|
|
@ -16,8 +16,9 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@user = User.first(:id => params[:id])
|
@user = User.first(:id => params[:id])
|
||||||
|
@person = @user.person
|
||||||
@profile = @user.profile
|
@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
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
@ -30,7 +31,4 @@ class UsersController < ApplicationController
|
||||||
render :action => 'edit'
|
render :action => 'edit'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
%h1
|
%h1
|
||||||
= @person.real_name
|
= @person.real_name
|
||||||
- unless @person.id == current_user.id
|
- unless @person.id == current_user.person.id
|
||||||
|
|
||||||
.right
|
.right
|
||||||
= link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete, :class => "button"
|
= link_to 'remove friend', @person, :confirm => 'Are you sure?', :method => :delete, :class => "button"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue