diff options
author | José Valim <jose.valim@gmail.com> | 2010-10-06 17:18:59 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-10-06 17:20:15 +0200 |
commit | d649bf158be130515566aed987f83d36ac9b0ae8 (patch) | |
tree | 4d056bbc2d84903dbf6931e0ee6aa6ded01094cd /activerecord/lib | |
parent | d40ca9cce241a8083756c993d6c99a79e62e050e (diff) | |
download | rails-d649bf158be130515566aed987f83d36ac9b0ae8.tar.gz rails-d649bf158be130515566aed987f83d36ac9b0ae8.tar.bz2 rails-d649bf158be130515566aed987f83d36ac9b0ae8.zip |
Provide a cleaner syntax for paths configuration that does not rely on method_missing.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 58c705c8b2..4ef6c6f751 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -2,7 +2,7 @@ namespace :db do task :load_config => :rails_env do require 'active_record' ActiveRecord::Base.configurations = Rails.application.config.database_configuration - ActiveRecord::Migrator.migrations_path = Rails.application.config.paths.db.migrate.to_a.first + ActiveRecord::Migrator.migrations_path = Rails.application.paths["db/migrate"].first end task :copy_migrations => :load_config do @@ -11,8 +11,8 @@ namespace :db do Rails.application.railties.all do |railtie| next unless to_load == :all || to_load.include?(railtie.railtie_name) - if railtie.config.respond_to?(:paths) && railtie.config.paths.db - railties[railtie.railtie_name] = railtie.config.paths.db.migrate.to_a.first + if railtie.respond_to?(:paths) && (path = railtie.paths["db/migrate"].first) + railties[railtie.railtie_name] = path end end |