Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10520: to_prepare.diff

File to_prepare.diff, 0.6 kB (added by akaspick, 8 months ago)

same fix as previous patch, but diff made from rails root (if that helps)

  • railties/lib/initializer.rb

    old new  
    539539    # 
    540540    # See Dispatcher#to_prepare. 
    541541    def to_prepare(&callback) 
    542       require 'dispatcher' unless defined?(::Dispatcher) 
    543       Dispatcher.to_prepare(&callback) 
     542      after_initialize do 
     543        require 'dispatcher' unless defined?(::Dispatcher) 
     544        Dispatcher.to_prepare(&callback) 
     545      end 
    544546    end 
    545547 
    546548    def builtin_directories