Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. Vadims-MacBook-Pro:boss vadimnekrasov$ bundle exec rails c
  2. Loading development environment (Rails 4.2.5)
  3. [1] pry(main)> user = User.find(1)
  4. User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
  5. => #<User:0x007fe3b6c94428
  6. id: 1,
  7. encrypted_password: "$2a$10$bU.yAsnIu08bqXWQaGn1wOCNhEqyv.CH3Esstjx4ufAKYzUDtFwV.",
  8. reset_password_token: "UsvNdrNqrhL3yMxmoa2k",
  9. reset_password_sent_at: nil,
  10. remember_created_at: nil,
  11. sign_in_count: 108,
  12. current_sign_in_at: Tue, 21 Mar 2017 13:54:34 GMT +00:00,
  13. last_sign_in_at: Mon, 20 Mar 2017 11:19:14 GMT +00:00,
  14. current_sign_in_ip: "109.155.56.173",
  15. last_sign_in_ip: "109.155.56.173",
  16. created_at: Thu, 24 Dec 2015 13:07:55 GMT +00:00,
  17. updated_at: Tue, 21 Mar 2017 13:54:34 GMT +00:00,
  18. role: "dev",
  19. enabled: true,
  20. failed_attempts: 0,
  21. unlock_token: nil,
  22. locked_at: nil,
  23. confirmation_token: nil,
  24. confirmed_at: nil,
  25. confirmation_sent_at: nil,
  26. unconfirmed_email: nil,
  27. name_id: 1,
  28. email_address_id: 1,
  29. invite_id: nil,
  30. first: true,
  31. staff_member_id: nil,
  32. would_rehire: true>
  33. [2] pry(main)> user.update_attributes!(password: 'dev_password')
  34. (0.3ms) BEGIN
  35. EmailAddress Load (0.4ms) SELECT `email_addresses`.* FROM `email_addresses` WHERE `email_addresses`.`id` = 1 LIMIT 1
  36. EmailAddress Exists (2.0ms) SELECT 1 AS one FROM `email_addresses` WHERE (`email_addresses`.`email` = BINARY 'william@jsmbars.co.uk' AND `email_addresses`.`id` != 1) LIMIT 1
  37. Name Load (0.3ms) SELECT `names`.* FROM `names` WHERE `names`.`id` = 1 LIMIT 1
  38. SQL (0.4ms) UPDATE `users` SET `encrypted_password` = '$2a$10$Kd489BzN5LTzlw2CRuNpH.ppab6KFiGi2dR/vQb4eB7KaRN6z6K1W', `updated_at` = '2017-03-23 13:40:20' WHERE `users`.`id` = 1
  39. (0.4ms) COMMIT
  40. => true
  41. [3] pry(main)> exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement