... } build.gradle class Book { String name String about } grails-app/domain class BookController { static scaffold = Book } grails-app/controllers class BookController { static scaffold = true } Old Grails 2.x way
parameter named _method.Request gets intercepted by org.grails.web.filters.HiddenHttpMethodFilter.java which wraps the request and uses DELETE AWESOME! +1
def index(Integer max) { params.max = Math.min(max ?: 10, 100) respond Book.list(params), model:[bookCount: Book.count()] } I have not defined list() or count() methods. What is going on?
a static method invocation, but the methods themselves don’t actually exists in any form at the code level. Instead, a method is generated for us based on the properties of a given class.
agenda. I have a domain class: class AgendaEvent { String eventName Date eventDate } I want to restrict the application to enter only upcoming dates. Could you help me?
the performance price of retrieving the config value every time the service method is invoked. Services are singletons by default. void setConfiguration(Config co) will be called just once
- Profile for REST API applications •base - The base profile extended by other profiles •angular2 - A profile for creating Grails applications with Angular 2 •plugin - Profile for plugins designed to work across all profiles •profile - A profile for creating new Grails profiles •react - A profile for creating Grails applications with a React frontend •rest-api-plugin - Profile for REST API plugins •web - Profile for Web applications •web-jboss7 - A Profile for Creating a JBoss 7.1 EAP Project •web-plugin - Profile for Plugins designed for Web applications •webpack - A profile for creating applications with node-based frontends using webpack
it involves increasing a version number in gradle.properties I would diff two apps created from scratch with each version? Or use a https://github.com/erichelgeson/ grails-versions