search for: registered_from_ip

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

2006 Jan 16
4
Creating two records at once
...def register_user if request.get? @user = User.new @profile = Profile.new else # Get the parameters from the form and put them in the user object @user = User.new(params[:user]) @profile = Profile.new(params[:profile]) # Storing the users IP @user.registered_from_ip = request.remote_ip # Set the user''s status to a default of 2 # Status 1 = Admin # Status 2 = Member # Status 3 = General User @user.status = "2" @profile.user_id = @user.id if @user.save and @profile.save redirect_to_index(&qu...