Skip to content
Browse files

Make Controller Name use Controller Type instead of router output

  • Loading branch information...
1 parent b707be2 commit 2e3f6c5b007df06f5a09dbed24daa27a23d008a1 @pix64 pix64 committed Jun 11, 2013
Showing with 3 additions and 2 deletions.
  1. +3 −2 controller.go
View
5 controller.go
@@ -212,8 +212,6 @@ func (c *Controller) Message(message string, args ...interface{}) (value string)
// SetAction sets the action that is being invoked in the current request.
// It sets the following properties: Name, Action, Type, MethodType
func (c *Controller) SetAction(controllerName, methodName string) error {
- c.Name, c.MethodName = controllerName, methodName
- c.Action = c.Name + "." + c.MethodName
// Look up the controller and method types.
var ok bool
@@ -224,6 +222,9 @@ func (c *Controller) SetAction(controllerName, methodName string) error {
return errors.New("revel/controller: failed to find action " + methodName)
}
+ c.Name, c.MethodName = c.Type.Name(), methodName
+ c.Action = c.Name + "." + c.MethodName
+
// Instantiate the controller.
c.AppController = initNewAppController(c.Type.Type, c).Interface()

0 comments on commit 2e3f6c5

Please sign in to comment.
Something went wrong with that request. Please try again.