Files
rails/railties
Joseph Wong a89dfbf2e4 Patch for #1458 - [3.1.0.rc1] App plugins initialized before engines
and plugins inside engines

It seems that plugins inside a Rails 3.1 application proper (i.e. in
/vendor/plugins) are initialized before engines and plugins inside
engines.

After some debugging, I found the culprit in
Rails::Application::Railties#all:

  def all(&block)
    @all ||= railties + engines + super
    @all.each(&block) if block
    @all
  end

The call to super here implicitly passes the &block argument, which
has the unfortunate side-effect of adding the plugin initializers
first (in front of other railties and engines) in the case of
Rails::Engine#initializers:

def initializers
  initializers = []
  railties.all { |r| initializers += r.initializers }
  initializers += super
  initializers
end

The solution here is to replace the super call with a call
to #plugins.
2011-06-16 12:58:08 -07:00
..
2011-06-16 11:37:38 +05:30
2009-10-16 19:25:21 -05:00
2011-03-05 11:56:33 +01:00

= Railties -- Gluing the Engine to the Rails

Railties is responsible to glue all frameworks together. Overall, it:

* handles all the bootstrapping process for a Rails application;

* manages rails command line interface;

* provides Rails generators core;


== Download

The latest version of Railties can be installed with Rubygems:

* gem install railties

Documentation can be found at

* http://api.rubyonrails.org


== License

Railties is released under the MIT license.