What is the earliest callback that can be used in the Rails Framework?

I found before_dispatch and after_dispatch in dispatcher.rb, but I need to access something earlier. As with when Rails.public_path is defined.

+1


source to share


2 answers


Not sure what you are trying to do, but you can take a look at config/boot.rb

(don't change it please). You will find the file there config/preinitializer.rb

if it exists. However, this might be overkill, perhaps you can do what you want by creating an initializer in config/initializers/

.



+1


source


If this is required for Mongrel or Apache, are you sure it cannot be done using configuration?



0


source







All Articles