Displaying 1 result from an estimated 1 matches for "taneous".
Did you mean:
geneous
2009 Jul 07
1
Adding data in two tables simul;taneously with Validations
Hi All,
I have 2 tables
1] user_infos &
2] users
class UserInfo
has_one :user
validates_presence_of :city
class User
belongs_to :user_info
validates_presence_of :first_name
i write following code in my create method.
@user_info = UserInfo.new(params[:user_info])
@user=@user_info.build_user(:first_name=>'''')
if @user_info.save
else
end
now what i want is to