开发者

Where should I put CONTROLLER helper methods?

I know that "helpers" are usually for views/templates. But say I have a helper method that I want to call from different controllers. Where should this file go?

I was thinking 开发者_开发技巧of creating a helper module in the "models" folder but I'd like to know if there's a "correct" way to do this.


Any method you put in ApplicationController will be inherited by your other controllers (as long as it's not private of course).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜