Calling a method from another controller

后端 未结 4 748
逝去的感伤
逝去的感伤 2020-12-04 18:09

If I\'ve got a method in a different controller to the one I\'m writing in, and I want to call that method, is it possible, or should I consider moving that method to a help

4条回答
  •  天命终不由人
    2020-12-04 18:26

    Try and progressively move you methods to your models, if they don't apply to a model then a helper and if it still needs to be accessed elsewhere put in the ApplicationController

提交回复
热议问题