diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-27 19:27:40 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-05-27 19:27:40 -0300 |
commit | be4b3df8bbd6a0ca8401e85103f3b8ffeed8ea70 (patch) | |
tree | 55d382271be6179eb1cec5c46a3c2b2011c20174 /railties/lib | |
parent | d0a99c8b263a5d58203871a12611bb5e969313cd (diff) | |
parent | 50de394cc863acac9400e955cb93ed81b45e9eac (diff) | |
download | rails-be4b3df8bbd6a0ca8401e85103f3b8ffeed8ea70.tar.gz rails-be4b3df8bbd6a0ca8401e85103f3b8ffeed8ea70.tar.bz2 rails-be4b3df8bbd6a0ca8401e85103f3b8ffeed8ea70.zip |
Merge pull request #15269 from arunagw/aa-fixes-8930
rake railties:install:migrations respects the order of railties
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/application.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 2fde974732..362713eb75 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -364,6 +364,10 @@ module Rails end end + def migration_railties # :nodoc: + (ordered_railties & railties_without_main_app).reverse + end + protected alias :build_middleware_stack :app @@ -394,6 +398,11 @@ module Rails super end + def railties_without_main_app # :nodoc: + @railties_without_main_app ||= Rails::Railtie.subclasses.map(&:instance) + + Rails::Engine.subclasses.map(&:instance) + end + # Returns the ordered railties for this application considering railties_order. def ordered_railties #:nodoc: @ordered_railties ||= begin |