jeudi 24 janvier 2019

How to use faker gem to generate fake food names?

I have read up several tutorials, but I am still unsure how to do what I want, therefore I am sorry if it sounds dump. I have an active record called "Sandwitches", which has as attributes: name, price and availability. As I want to generate fake data for it, I am not quite sure how I can achieve something like this, because the name attribute faker can generate stands for names of persons. I would like for instance to generate names for the sandwitches, like "Club Sandwitch" or "Pesto with Feta Cheese". Is there anyway to do this with faker gem ? Or basically could I use any other gem to achieve that?

I apppreciate any help you can provide!

Aucun commentaire:

Enregistrer un commentaire