Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vadims-MacBook-Pro:boss vadimnekrasov$ bundle exec rails c
- Loading development environment (Rails 4.2.5)
- [1] pry(main)> user = User.find(1)
- User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
- => #<User:0x007fe3b6c94428
- id: 1,
- encrypted_password: "$2a$10$bU.yAsnIu08bqXWQaGn1wOCNhEqyv.CH3Esstjx4ufAKYzUDtFwV.",
- reset_password_token: "UsvNdrNqrhL3yMxmoa2k",
- reset_password_sent_at: nil,
- remember_created_at: nil,
- sign_in_count: 108,
- current_sign_in_at: Tue, 21 Mar 2017 13:54:34 GMT +00:00,
- last_sign_in_at: Mon, 20 Mar 2017 11:19:14 GMT +00:00,
- current_sign_in_ip: "109.155.56.173",
- last_sign_in_ip: "109.155.56.173",
- created_at: Thu, 24 Dec 2015 13:07:55 GMT +00:00,
- updated_at: Tue, 21 Mar 2017 13:54:34 GMT +00:00,
- role: "dev",
- enabled: true,
- failed_attempts: 0,
- unlock_token: nil,
- locked_at: nil,
- confirmation_token: nil,
- confirmed_at: nil,
- confirmation_sent_at: nil,
- unconfirmed_email: nil,
- name_id: 1,
- email_address_id: 1,
- invite_id: nil,
- first: true,
- staff_member_id: nil,
- would_rehire: true>
- [2] pry(main)> user.update_attributes!(password: 'dev_password')
- (0.3ms) BEGIN
- EmailAddress Load (0.4ms) SELECT `email_addresses`.* FROM `email_addresses` WHERE `email_addresses`.`id` = 1 LIMIT 1
- 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
- Name Load (0.3ms) SELECT `names`.* FROM `names` WHERE `names`.`id` = 1 LIMIT 1
- 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
- (0.4ms) COMMIT
- => true
- [3] pry(main)> exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement