1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-23 03:40:49 +00:00

controller data inherit the context's data

This commit is contained in:
asta.xie 2014-02-07 17:25:56 +08:00
parent 17dd72241b
commit c4250872ca

View File

@ -76,6 +76,9 @@ func (c *Controller) Init(ctx *context.Context, controllerName, actionName strin
c.TplExt = "tpl"
c.AppController = app
c.EnableReander = true
for k, v := range ctx.Input.Data {
c.Data[k] = v
}
}
// Prepare runs after Init before request function execution.