Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def new_user
- #/manage_account/new_user?firstName=ari&lastName=joniec&screenName=ari&password=password&email=ari@ari.com
- user = User.new(
- :login => params[:screenName],
- :email => params[:email]
- )
- #user.password_hash_type = ActiveRbacConfig.config(:model_default_hash_type)
- user.update_password(params[:password])
- #ui = UserInfo.new too much missing info...
- #ui.user = user
- #ui.save!
- begin
- # wait, think you should have made the car obj, then made the user, then done car.user = user, then save...
- user.save!
- car = UserCar.new(
- :user_id => user.id,
- :year => params[:carYear],
- :color => params[:carColor],
- :trim => params[:carTrim]
- )
- car.save!
- render :xml => @@success_xml
- rescue
- render :xml => error
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement