Advertisement
Guest User

Untitled

a guest
Jul 31st, 2017
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. def new_user
  2. #/manage_account/new_user?firstName=ari&lastName=joniec&screenName=ari&password=password&email=ari@ari.com
  3. user = User.new(
  4. :login => params[:screenName],
  5. :email => params[:email]
  6. )
  7. #user.password_hash_type = ActiveRbacConfig.config(:model_default_hash_type)
  8. user.update_password(params[:password])
  9.  
  10. #ui = UserInfo.new too much missing info...
  11. #ui.user = user
  12. #ui.save!
  13.  
  14. begin
  15. # wait, think you should have made the car obj, then made the user, then done car.user = user, then save...
  16. user.save!
  17. car = UserCar.new(
  18. :user_id => user.id,
  19. :year => params[:carYear],
  20. :color => params[:carColor],
  21. :trim => params[:carTrim]
  22. )
  23. car.save!
  24. render :xml => @@success_xml
  25. rescue
  26. render :xml => error
  27. end
  28.  
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement