Skip to content
Extraits de code Groupes Projets
people_controller.rb 848 octets
Newer Older
class PeopleController < ApplicationController
  before_filter :authenticate_user!
  
  def index
Raphael's avatar
Raphael a validé
      @people = current_user.friends.paginate :page => params[:page], :order => 'created_at DESC'
Raphael's avatar
Raphael a validé
      @people = Person.search(params[:q])
      render :json => @people.to_json(:only => :_id)
    @person = current_user.visible_person_by_id(params[:id])
    @profile = @person.profile
    @posts = Post.find_all_by_person_id(@person.id).paginate :page => params[:page], :order => 'created_at DESC'
    @latest_status_message = StatusMessage.newest_for(@person)
    current_user.unfriend(current_user.visible_person_by_id(params[:id]))
    flash[:notice] = "unfriended person."