matrei commented on issue #15132:
URL: https://github.com/apache/grails-core/issues/15132#issuecomment-3528623662

   Probably a dumb question, but may I ask the use case for first creating a 
url with the `LinkGenerator` and then passing that url to `redirect()` (where 
the LinkGenerator will be invoked again) instead of calling `redirect()` 
directly?
   
   From the example application provided: 
https://github.com/imranmir/redirect-issue
   
   ```groovy
   class TestController {
   
       LinkGenerator grailsLinkGenerator
   
       def index() {
           def url = grailsLinkGenerator.link(controller: 'menu', action: 
'home')
           redirect(url: url)
      }
   
       // vs
   
       def index2() {
           redirect(controller: 'menu', action: 'home')
       }
   }
   ```


-- 
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]

Reply via email to