Skip to content

Commit

Permalink
GRAILS-8917 if nothing is returned from a controller action, use an e…
Browse files Browse the repository at this point in the history
…mpty model, not the properties of the controller instance
  • Loading branch information
burtbeckwith committed Jul 28, 2013
1 parent cb22c50 commit 544f37b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 61 deletions.
Expand Up @@ -384,15 +384,7 @@ public ModelAndView handleActionResponse(GroovyObject controller, Object returnV
if (viewNameBlank) {
return null;
}

Map model;
if (!chainModel.isEmpty()) {
model = new CompositeMap(chainModel, new GrailsControllerBeanMap(controller));
}
else {
model = new GrailsControllerBeanMap(controller);
}
return new ModelAndView(viewName, model);
return new ModelAndView(viewName, chainModel);
}

if (returnValue instanceof Map) {
Expand Down Expand Up @@ -430,14 +422,7 @@ public ModelAndView handleActionResponse(GroovyObject controller, Object returnV
return modelAndView;
}

Map model;
if (!chainModel.isEmpty()) {
model = new CompositeMap(chainModel, new GrailsControllerBeanMap(controller));
}
else {
model = new GrailsControllerBeanMap(controller);
}
return new ModelAndView(viewName, model);
return new ModelAndView(viewName, chainModel);
}

@SuppressWarnings("rawtypes")
Expand Down

This file was deleted.

0 comments on commit 544f37b

Please sign in to comment.