开发者

In rails, what is the equivalent of asp.net's App_Code folder?

In rails, what is the equivalent of asp.net's App_Code folder?

Eg, where do you put your various utility classes for your complicated business logic that you don't want开发者_运维问答 to shove in your controllers or helpers?


That would be the lib directory.


To be clear, complicated business logic goes into your model. Stick with the convention of thick models, skinny controllers.

If you have view related helper methods these go into your helpers. Other miscellaneous stuff can be put in your lib directory as @Jakub said.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜