From fca57cf04e9f44f3dffbd578b7a9dff56dfc73d8 Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 7 Feb 2008 19:46:51 +0000 Subject: [PATCH] redirect to right object git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@152 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7 --- app/controllers/friends_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/friends_controller.rb b/app/controllers/friends_controller.rb index 16d17e7..7bb6158 100644 --- a/app/controllers/friends_controller.rb +++ b/app/controllers/friends_controller.rb @@ -17,11 +17,11 @@ class FriendsController < ApplicationController def create @friend = Friend.new(params[:friend]) @people = @friend.source - @page = @friend.destination + @dest = @friend.destination respond_to do |format| if @friend.save flash[:notice] = 'Successfully added the new friend' - format.html { redirect_to people_path(@page.title_for_url) } + format.html { redirect_to people_path(@dest.page.title_for_url) } else format.html { render :action => "new" } end