File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
src/grails/grails-app/taglib Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,11 @@ class ApplicationTagLib {
8383 attrs = attrs. remove(' url' )
8484 }
8585
86- def controller = attrs. remove(" controller" )
86+ def controller = attrs. contains( " controller " ) ? attrs . remove(" controller" ) : grailsAttributes . getController(request) . controllerName
8787 def action = attrs. remove(" action" )
8888 def params = attrs. params ? attrs. remove(' params' ) : [:]
89- def mapping = grailsUrlMappingsHolder?. getReverseMapping(controller,
89+
90+ def mapping = grailsUrlMappingsHolder?. getReverseMapping(controller,
9091 action,
9192 params)
9293 def url
@@ -103,13 +104,7 @@ class ApplicationTagLib {
103104 out << url
104105 }
105106 else {
106- // if the current attribute null set the controller uri to the current controller
107- if (controller) {
108- out << ' /' << controller
109- }
110- else {
111- out << grailsAttributes. getControllerUri(request)
112- }
107+ out << ' /' << controller
113108 if (action) {
114109 out << ' /' << action
115110 }
You can’t perform that action at this time.
0 commit comments