创建/读取/更新&未生成删除视图

时间:2011-09-27 20:26:58

标签: grails

我有一个Race类和RaceController类。创建/读取/更新&当我运行应用程序时,即使你在控制器类中有“def scaffold = true”,也没有生成删除视图。如何生成创建/读取/更新&删除文件

class Race {

    static hasMany = [registrations:Registration]


    String name
    Date startDate
    String city 
    String state 
    BigDecimal distance 
    BigDecimal cost 
    Integer maxRunners = 100000

    static constraints = {

        name()
        startDate()
        city()
        state()
        distance()
        cost()
        maxRunners()
    }

}

class RaceController {

    def scaffold = true
}

2 个答案:

答案 0 :(得分:3)

应该是:

static scaffold = true

def scaffold = true

答案 1 :(得分:0)

grails generate-views some.package.DomainObject

将创建物理文件