add unique name to configuration
authorSven Arnold <sven@schnuppe.(none)>
Sun, 12 Apr 2009 19:13:12 +0000 (21:13 +0200)
committerSven Arnold <sven@schnuppe.(none)>
Sun, 12 Apr 2009 19:13:12 +0000 (21:13 +0200)
grails-app/conf/BootStrap.groovy
grails-app/domain/PortalConfiguration.groovy

index f43e95a..1c0e814 100644 (file)
@@ -3,7 +3,7 @@ class BootStrap {
      def init = { servletContext ->
 
        // initialize configuration
-       def config = new PortalConfiguration(title: "Schnuppe Portal", motto: "A new star is born", theme: "grey")
+       def config = new PortalConfiguration(name: "default", title: "Schnuppe Portal", motto: "A new star is born", theme: "grey")
        assert config.save()
 
        // some top level pages
index 50111d7..6c25447 100644 (file)
@@ -1,10 +1,12 @@
 class PortalConfiguration {
 
+  String name
   String title
   String motto
   String theme
 
   static constraints = {
+    name(unique: true)
     title(nullable: false)
     motto(nullable: true)
     theme(nullable: false)