diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-15 06:53:18 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2013-01-15 06:53:18 -0800 |
commit | 8348f9ea72c9b50fc4d4462fd9ebe3bba932c783 (patch) | |
tree | 2b084edc78e72adba240a23e583967b7ce8dddee | |
parent | 9dfe2d6f9fabddf9a451a995678a9648c8aaf401 (diff) | |
parent | 9dcd2a8bc40f1335bc0fb97e6c1d801a7bccaf86 (diff) | |
download | rails-8348f9ea72c9b50fc4d4462fd9ebe3bba932c783.tar.gz rails-8348f9ea72c9b50fc4d4462fd9ebe3bba932c783.tar.bz2 rails-8348f9ea72c9b50fc4d4462fd9ebe3bba932c783.zip |
Merge pull request #8930 from cordawyn/ordered_railties
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) |