search for: saved_user

Displaying 1 result from an estimated 1 matches for "saved_user".

Did you mean: sales_user
2006 Feb 03
6
Saving a User Object while in the Address Controller
...;t the exact code, but it shows what I am trying to do. class AddressesController < ApplicationController def create @address = Address.new(params[:address]) saved_address = @address.save @user = User.find(params[:id]) @user.address_id = @address.id saved_user = @user.save end end User.save keeps on returning false. Any ideas why? I can access different attributes of the user, so I know that the proper user is getting returned from the find. In my user class I have attr_accessible :address_id so I should be able to access it, shouldn''t I...