Skip to content

Commit

Permalink
When using respond, of the object is a map treat it as the model
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Sep 4, 2015
1 parent 3b5dfe9 commit 8d4298e
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -81,7 +81,12 @@ class DefaultHtmlRenderer<T> implements Renderer<T> {
}

protected void applyModel(RenderContext context, Object object) {
context.setModel([(resolveModelVariableName(object)): object])
if(object instanceof Map) {
context.setModel((Map)object)
}
else {
context.setModel([(resolveModelVariableName(object)): object])
}
}

protected String resolveModelVariableName(Object object) {
Expand Down

0 comments on commit 8d4298e

Please sign in to comment.