-
Notifications
You must be signed in to change notification settings - Fork 5
Rake task adminpanel:populate
Jose Ramon edited this page Apr 24, 2014
·
7 revisions
You can use bundle exec rake adminpanel:populate[x, model, field:type field2:type2...] to generate x records (x is an integer) of Adminpanel::Model whose attributes are of the type field:type...
supportes parameters for type are
-
nothingvalue will be Lorem ipsum dolor sit amec -
namevalue will be a prefix, a name and a last name -
categoryvalue will be a category name -
descriptionorloremvalue will be a lorem ipsum between 60 and 80 words -
lorem_nameorsentencevalue will be a lorem ipsum [1..4] words -
numbervalue will be a number between 1 and 5000 -
urlgenerates a random url -
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.