DEV: Fix user simulator script.
This commit is contained in:
parent
5f0d38341e
commit
ab6ad220c7
|
@ -50,7 +50,7 @@ puts "Simulating activity for user id #{user.id}: #{user.name}"
|
||||||
while true
|
while true
|
||||||
puts "Creating a random topic"
|
puts "Creating a random topic"
|
||||||
category = Category.where(read_restricted: false).order('random()').first
|
category = Category.where(read_restricted: false).order('random()').first
|
||||||
PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.name)
|
PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.id)
|
||||||
|
|
||||||
puts "creating random reply"
|
puts "creating random reply"
|
||||||
PostCreator.create(user, raw: sentence, topic_id: last_topics.sample)
|
PostCreator.create(user, raw: sentence, topic_id: last_topics.sample)
|
||||||
|
|
Loading…
Reference in New Issue