move $action to define in class not template
Merge pull request #96 from afragen/move-method

move $action to define in class not template