diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-10 13:17:35 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-10 13:19:11 -0800 |
commit | 5e04884bce611625a77784729bf9b8aaf60d67c8 (patch) | |
tree | c78d72ca69d795bd4a2e02254e2a60d32b513208 | |
parent | 03f62755e38305381f20384dc2fa3c7576954be4 (diff) | |
download | rails-5e04884bce611625a77784729bf9b8aaf60d67c8.tar.gz rails-5e04884bce611625a77784729bf9b8aaf60d67c8.tar.bz2 rails-5e04884bce611625a77784729bf9b8aaf60d67c8.zip |
deprecate the subdirectories parameter to `migrations`
Conflicts:
activerecord/lib/active_record/migration.rb
-rw-r--r-- | activerecord/lib/active_record/migration.rb | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/migration.rb b/activerecord/lib/active_record/migration.rb index 46464783fd..9093004852 100644 --- a/activerecord/lib/active_record/migration.rb +++ b/activerecord/lib/active_record/migration.rb @@ -1,6 +1,10 @@ require "active_support/core_ext/module/delegation" require "active_support/core_ext/class/attribute_accessors" +<<<<<<< HEAD require "active_support/core_ext/array/wrap" +======= +require 'active_support/deprecation' +>>>>>>> f00491b... deprecate the subdirectories parameter to `migrations` module ActiveRecord # Exception that can be raised to stop migrations from going backwards. @@ -508,7 +512,7 @@ module ActiveRecord File.basename(filename) end - delegate :migrate, :announce, :write, :to=>:migration + delegate :migrate, :announce, :write, :to => :migration private @@ -594,7 +598,14 @@ module ActiveRecord migrations_paths.first end - def migrations(paths, subdirectories = true) + def migrations(paths, *args) + if args.empty? + subdirectories = true + else + subdirectories = args.first + ActiveSupport::Deprecation.warn "The `subdirectories` argument to `migrations` is deprecated" + end + paths = Array.wrap(paths) glob = subdirectories ? "**/" : "" |