FIX: Modify frozen String and profile_db_generator uses category id (#8080)
This commit is contained in:
parent
7d5f3c1338
commit
1d73754e84
|
@ -35,7 +35,7 @@ def sentence
|
||||||
gabbler.learn(story)
|
gabbler.learn(story)
|
||||||
end
|
end
|
||||||
|
|
||||||
sentence = ""
|
sentence = +""
|
||||||
until sentence.length > 800 do
|
until sentence.length > 800 do
|
||||||
sentence << @gabbler.sentence
|
sentence << @gabbler.sentence
|
||||||
sentence << "\n"
|
sentence << "\n"
|
||||||
|
@ -104,7 +104,7 @@ puts
|
||||||
puts "Creating 100 topics"
|
puts "Creating 100 topics"
|
||||||
|
|
||||||
topic_ids = 100.times.map do
|
topic_ids = 100.times.map do
|
||||||
post = PostCreator.create(users.sample, raw: sentence, title: sentence[0..50].strip, category: categories.sample.name, skip_validations: true)
|
post = PostCreator.create(users.sample, raw: sentence, title: sentence[0..50].strip, category: categories.sample.id, skip_validations: true)
|
||||||
|
|
||||||
putc "."
|
putc "."
|
||||||
post.topic_id
|
post.topic_id
|
||||||
|
|
Loading…
Reference in New Issue