ruthst00 commented on code in PR #16516: URL: https://github.com/apache/grails-core/pull/16516#discussion_r4340302990
########## grails-doc/src/en/ref/Controllers/render.adoc: ########## @@ -95,7 +95,10 @@ render(file: new File(absolutePath), inline: true) A multi-purpose method for rendering responses to the client which is best illustrated with a few examples! Warning - this method does not always support multiple parameters. For example, if you specify both collection and model, the model parameter will be ignored. -Parameters + +Rendering a response body (for example, with `render(template: ...)` or `render(text: ...)`) suppresses the action's implicit view rendering, even if the action subsequently returns a model map. In contrast, `render(view: ...)` explicitly selects a view to render. Review Comment: Fixed in https://github.com/apache/grails-core/pull/16516/changes/c4cb607c2bde85b90d50410431d321ec60dbe31b ########## grails-test-examples/issue-15819/grails-app/controllers/issue15819/SearchController.groovy: ########## @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package issue15819 + +import grails.compiler.GrailsCompileStatic + +@GrailsCompileStatic +class SearchController { + + static allowedMethods = [results: 'GET'] + + def results() { + // Preserve the reproducer's template name: Grails resolves it to __results.gsp. + render(template: '_results', model: [results: ['Grails', 'Groovy', 'Spring Boot']]) Review Comment: Fixed in https://github.com/apache/grails-core/pull/16516/changes/c4cb607c2bde85b90d50410431d321ec60dbe31b -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
