I use the Faker gem to seed my db with fake data. For some variables I for example use Faker::Lorem.paragraph(4)
. But what I would really want is to seed with text that has styling in it. Such as <p></p><b>
etc. Is this possible with the Faker gem?
1 Answer
You can use Faker::Lorem.paragraphs(4)
. It returns an array, which you can then modify as needed.
Like:
Faker::Lorem.paragraphs(4).map{|pr| "<p>#{pr}</p>"}.join