Permalink
Browse files

deprecate the subdirectories parameter to `migrations`

Conflicts:

	activerecord/lib/active_record/migration.rb
  • Loading branch information...
1 parent 03f6275 commit 5e04884bce611625a77784729bf9b8aaf60d67c8 @tenderlove tenderlove committed Jan 10, 2012
Showing with 13 additions and 2 deletions.
  1. +13 −2 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 @@ def basename
File.basename(filename)
end
- delegate :migrate, :announce, :write, :to=>:migration
+ delegate :migrate, :announce, :write, :to => :migration
private
@@ -594,7 +598,14 @@ def migrations_path
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 ? "**/" : ""

0 comments on commit 5e04884

Please sign in to comment.