ruby - Is there a quick way to create random development data for a Rails application? -
I would like to write a rake that will load some development data for my app so that I can see what the design looks like Some data in the browser, with the population there. I have tried hacking something together using ActiveRecord and Faker gem, but I have difficulty keeping it simple and practical.
The problem is that the relationship between classes is quite complex.
Just to think about how it is, here is a simplified version of the layout part. .
property ------ make the model serial_number asset_type_id asset_types ----------- normal_type specific_type attribute_name ------------- - Asset_id name attribute_values ---------------- value asset_id attribute_name_id
include user
and roles also
and a group of others.
Any suggestions? Should I Know About Auxiliary Gems?
To add one thing ... it would be nice if there is a feeling of data. As if the asset type was "computer", then "dell" was created etc. Although it is not strictly necessary.
You also have a look and / or (which uses a robot, but in itself a Is gem) can also want to see.
Comments
Post a Comment