Advertisement
leo91000

Untitled

Nov 29th, 2017
819
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. 2.3.4 :021 > user = User.create(first_name: 'Name', last_name: 'Surname', email: 'email@example.com', username: 'Username', password: 'password', password_confirmation: 'password', newsletter_status: true)
  2. (0.1ms) begin transaction
  3. Role Load (0.3ms) SELECT "roles".* FROM "roles" WHERE "roles"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]]
  4. User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER(?) LIMIT ? [["email", "email@example.com"], ["LIMIT", 1]]
  5. User Exists (0.1ms) SELECT 1 AS one FROM "users" WHERE "users"."username" = ? LIMIT ? [["username", "Username"], ["LIMIT", 1]]
  6. (0.1ms) rollback transaction
  7. => #<User id: nil, username: "Username", email: "email@example.com", password_digest: nil, first_name: "Name", last_name: "Surname", role_id: 1, created_at: nil, updated_at: nil, newsletter_status: true>
  8. 2.3.4 :022 > user.errors.full_messages
  9. => ["Password can't be blank"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement