rails配置加载顺序

Wednesday, July 21, 2010

  1. config/preinitializer.rb
  2. config/environment.rb
  3. config/environments/#{RAILS_ENV}.rb
  4. plugin initialization
  5. gem initialization
  6. config/initializer/*.rb
  7. all after_initialize blocks, in the order they were defined in (so
    same order as above)
  8. any junk left below the Rails::Initializer.run call/block in
    environment.rb

ref: Rails initialization and configuration
order

This entry was tagged Rails

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top