method

load_observers

rails latest stable - Class: Rails::Initializer

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

load_observers()
public

No documentation available.

# File railties/lib/initializer.rb, line 397
    def load_observers
      if gems_dependencies_loaded && configuration.frameworks.include?(:active_record)
        ActiveRecord::Base.instantiate_observers
      end
    end

1Note

not loaded if any gems missing at startup

darraghcurran ยท Aug 6, 20081 thank

similar to http://rails-doc.org/rails/Rails/Initializer/load_application_initializers#95-initializers

observers and custom initializers aren't loaded if any gems are missing -

current behaviour isn't great - as it's not intuitive - and you get no warning.

here's a lighthouse ticket i created a while ago about this.

http://rails.lighthouseapp.com/projects/8994/tickets/618-initializer-doesnt-load-observers-initializers-if-unable-to-load-a-gem#ticket-618-1