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 to know the same about the following file:
- config/environments/*.rb (development, production, or test, depending on the current mode)
- boot.rb
- environment.rb
- routes.rb
One of the reasons I'm asking this is, I want to know where is a good place to put
- initialization code
- custom configuration data
EDIT:
@Gdeglin's answer is good, but I'm actually interested in knowing when each of these files run.