Problems with has_one - not saving association

Ben Jackson
2005-06-15T00:49:36Z

Here are my models:

class Person < ActiveRecord::Base
	has_one :user
	# class code...

class User < ActiveRecord::Base
	# class code...

And my controller:

class PersonController < ApplicationController
	def create
		unless logged_in?
			@user = User.new(@params[:user])
		else
			@user = @session[''user'']
		end
		@person = Person.new(@params[:person])
		@person.user = @user
		render_text @person.user_id
	end
end

@user.id is tracing out as expected, but the render_text call keep
spitting out 0. What am I doing wrong?
___________________
Ben Jackson
Diretor de Desenvolvimento

ben-p14LI7ZcAE/pVLaUnt/cCQC/G2K4zDHf@public.gmane.org