diff options
author | Slava Kravchenko <slava.kravchenko@gmail.com> | 2013-01-14 16:05:09 +0300 |
---|---|---|
committer | Slava Kravchenko <slava.kravchenko@gmail.com> | 2013-01-14 17:27:18 +0300 |
commit | 9dcd2a8bc40f1335bc0fb97e6c1d801a7bccaf86 (patch) | |
tree | c0ba678a344700cbf9764dea82cf6caffb653212 | |
parent | 0246712bc15201ea1e8285af5adc5b2620538b5d (diff) | |
download | rails-9dcd2a8bc40f1335bc0fb97e6c1d801a7bccaf86.tar.gz rails-9dcd2a8bc40f1335bc0fb97e6c1d801a7bccaf86.tar.bz2 rails-9dcd2a8bc40f1335bc0fb97e6c1d801a7bccaf86.zip |
rake railties:install:migrations respects the order of railties
-rw-r--r-- | activerecord/CHANGELOG.md | 4 | ||||
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 5a0c391154..5d2e9f4cb6 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,9 @@ ## Rails 4.0.0 (unreleased) ## +* Rake task `railties:install:migrations` respects the order of railties. + + *Slava Kravchenko* + * Remove support for parsing YAML parameters from request. *Aaron Patterson* diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 259d0ff12b..ab061c26ad 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -420,7 +420,7 @@ namespace :railties do task :migrations => :'db:load_config' do to_load = ENV['FROM'].blank? ? :all : ENV['FROM'].split(",").map {|n| n.strip } railties = {} - Rails.application.railties.each do |railtie| + Rails.application.ordered_railties.each do |railtie| next unless to_load == :all || to_load.include?(railtie.railtie_name) if railtie.respond_to?(:paths) && (path = railtie.paths['db/migrate'].first) |