Rails applications' life cycle

后端 未结 4 2026
甜味超标
甜味超标 2021-01-30 14:11

I\'m trying to learn the life cycle of a rails application. When is application_controller.rb run? Is it just once every time it\'s changed, or on every request?

I want

4条回答
  •  孤城傲影
    2021-01-30 14:44

    It is common practice to put initialization stuff in the config/initializers/ directory. This way you can keep your environment.rb files clean(er).

    See this post by Ryan Daigle.

提交回复
热议问题