From c155da5e10b3ec00eb792b2052900e1775ea78a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Tue, 13 Dec 2016 14:20:43 +0100 Subject: [PATCH] Change seeds to provide meaningful data for querying public_author from API --- db/dev_seeds.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/db/dev_seeds.rb b/db/dev_seeds.rb index 87dc94a2e..b0a2347ee 100644 --- a/db/dev_seeds.rb +++ b/db/dev_seeds.rb @@ -41,7 +41,15 @@ puts "Creating Users" def create_user(email, username = Faker::Name.name) pwd = '12345678' puts " #{username}" - User.create!(username: username, email: email, password: pwd, password_confirmation: pwd, confirmed_at: Time.current, terms_of_service: "1") + User.create!( + username: username, + email: email, + password: pwd, + password_confirmation: pwd, + confirmed_at: Time.current, + terms_of_service: "1", + public_activity: (rand(1..100) > 30) + ) end admin = create_user('admin@consul.dev', 'admin')