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.
精彩评论