e is logic that would be the same if the resource generated by the view was a different type (say JSON or XML) then its likely that logic belongs in the controller. However I encourage you to choose