email uniqueness validation. Rb rand(5.11).times eate user error: ActiveRecord:RecordInvalid: Validation failed: Email has already been taken. Factory for users: #users. Email password "password" password_confirmation "password" end end, and the code in seeds. FactoryGirl: 1 pry(main) eate user). # User id: 3, first_name: "Osvaldo last_name: "Wunsch email: phone: 912)530-4949 x64848 created_at: " 20:57:27 updated_at: " 20:57:27 encrypted_password: reset_password_token: nil, reset_password_sent_at: nil, remember_created_at: nil, sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil 2 pry(main) eate user).
By using Twitters services you agree to our. Rb require 'faker' fine do factory :user do first_name Faker:rst_name last_name Faker:st_name phone Faker:PhoneNumber. I am using FactoryGirl and Faker to generate user objects in my seeds. Why is Faker producing the same data every time when used through FactoryGirl?