Created
January 26, 2012 22:14
-
-
Save Vp3n/1685436 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bootstrap; | |
import models.MenuItem; | |
import play.Play; | |
import play.jobs.Job; | |
import play.jobs.OnApplicationStart; | |
import play.test.Fixtures; | |
@OnApplicationStart | |
public class DataLoader extends Job { | |
@Override | |
public void doJob() throws Exception { | |
if(Play.mode.isDev() && MenuItem.count() == 0) { | |
Fixtures.loadModels("_010_menuItem.yml"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment