From 0e454f2ce7674994c9fdaa4683bac5a4e383b0e1 Mon Sep 17 00:00:00 2001 From: Pedro Morgan Date: Sun, 12 Mar 2017 01:49:56 +0000 Subject: [PATCH] viewsss --- controller.go | 6 +++--- validation.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/controller.go b/controller.go index 8b5066f63..8bfbae2f1 100644 --- a/controller.go +++ b/controller.go @@ -36,7 +36,7 @@ type Controller struct { Session Session // Session, stored in cookie, signed. Params *Params // Parameters from URL and form (including multipart). Args map[string]interface{} // Per-request scratch space. - RenderArgs map[string]interface{} // Args passed to the template. + ViewArgs map[string]interface{} // Variables passed to the template. Validation *Validation // Data validation helpers } @@ -47,7 +47,7 @@ func NewController(req *Request, resp *Response) *Controller { Response: resp, Params: new(Params), Args: map[string]interface{}{}, - RenderArgs: map[string]interface{}{ + ViewArgs: map[string]interface{}{ "RunMode": RunMode, "DevMode": DevMode, }, @@ -69,7 +69,7 @@ func (c *Controller) SetCookie(cookie *http.Cookie) { func (c *Controller) RenderError(err error) Result { c.setStatusIfNil(http.StatusInternalServerError) - return ErrorResult{c.RenderArgs, err} + return ErrorResult{c.ViewArgs, err} } func (c *Controller) setStatusIfNil(status int) { diff --git a/validation.go b/validation.go index f37682cdf..270172f62 100644 --- a/validation.go +++ b/validation.go @@ -195,7 +195,7 @@ func ValidationFilter(c *Controller, fc []Filter) { fc[0](c, fc[1:]) // Add Validation errors to RenderArgs. - c.RenderArgs["errors"] = c.Validation.ErrorMap() + c.ViewArgs["errors"] = c.Validation.ErrorMap() // Store the Validation errors var errorsValue string