Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing controllers and domain classes in grails

Tags:

grails

as there is a process to create a controller or a domain class via grails create-XXX, are there any considerations be aware of for their removal ? Or is it enough to delete the class and the corresponding test ? Thanks.

like image 541
xain Avatar asked Feb 08 '10 12:02

xain


2 Answers

there's no automated removal - when I delete a controller I delete the tests, and any views that are no longer relevant.

You will need to make sure your controller is not referenced in any gsps (e.g by searching for tags containing controller="myController" or controller: "myController").

hth

like image 191
Dave Bower Avatar answered Oct 20 '22 18:10

Dave Bower


There's no command to remove them. Along with deleting the domain class, tests, and controller you need to delete any views you have created for that domain class.

like image 39
Jared Avatar answered Oct 20 '22 18:10

Jared