> So, is there a better Rails way of handling this?

Since Marnen said "you don't even need the hidden field", I started 
looking for an alternative. Seems like this worked for me.

------------------------------------------------
CONTROLLER
def create
   @user = User.new(params[:user])
   set_account_id = User.find(session[:user_id]).account.id
   @user.account_id = set_account_id

------------------------------------------------

account_id is the foreign key and @user.account_id sets it on the user 
object

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to