From d7a9c3c0874f45a8329381dbc99e688b2e72e198 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Aug 2010 12:18:36 -0700 Subject: [PATCH] Take out another couple friends.first and replace with friend_by_id --- app/controllers/application_controller.rb | 2 +- app/controllers/people_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 89c637b13..c3b74a861 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -20,7 +20,7 @@ class ApplicationController < ActionController::Base @groups = current_user.groups @friends = current_user.friends @latest_status_message = StatusMessage.newest_for(current_user.person) - @group = params[:group] ? current_user.groups.first(:id => params[:group]) : current_user.groups.first + @group = params[:group] ? current_user.group_by_id(params[:group]) : current_user.groups.first end end diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 686a81b88..16cb235b8 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -15,7 +15,7 @@ class PeopleController < ApplicationController end def destroy - current_user.unfriend(current_user.friends.first(params[:id])) + current_user.unfriend(current_user.friend_by_id(params[:id])) flash[:notice] = "unfriended person." redirect_to people_url end