-
Notifications
You must be signed in to change notification settings - Fork 5
Rake task adminpanel:populate
joseramonc edited this page Oct 16, 2014
·
7 revisions
You can use bundle exec rake adminpanel:populate[n, model, field:type field2:type2...] to generate n records (n is an integer), model is Adminpanel::Model whose attributes are of the type field:type...
supportes parameters for type are
-
nothingor any of invalid option. Ramdom lorem 1..6 words -
nameRandom name -
categoryFaker::Commerce.product_name -
descriptionorloremvalue will be a lorem ipsum between 60 and 80 words -
numbervalue will be a number between 1 and 5000 -
urlRandom url -
latrandom latitude for google maps -
lnggenerates a longitude for google maps -
lat_midrandom latitude in merida for google maps -
lng_midgenerates a longitude in merida for google maps -
idwill serach for a randomAdminpanel::Fieldand assign model.field_id to it -
emailwill generate a valid email (don't match with name) -
imagewill force the insantiation of the image but without a file, you'll just have the records in the database.