aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record/migration.rb15
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 ? "**/" : ""