aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixtures.rb
diff options
context:
space:
mode:
authorAlexey Muranov <alexey.muranov@gmail.com>2012-05-12 15:42:54 +0200
committerAlexey Muranov <alexey.muranov@gmail.com>2012-10-07 20:42:55 +0200
commitd871807a78ca607f5f78e8eaab99e3d46f284c63 (patch)
tree19ed9992c0bf7b63a4af3a454ca03b8e840f93d9 /activerecord/lib/active_record/fixtures.rb
parenta94220b66c9e4890007f66b092b25f8a64a19d31 (diff)
downloadrails-d871807a78ca607f5f78e8eaab99e3d46f284c63.tar.gz
rails-d871807a78ca607f5f78e8eaab99e3d46f284c63.tar.bz2
rails-d871807a78ca607f5f78e8eaab99e3d46f284c63.zip
Deprecate "Fixtures" constant
Diffstat (limited to 'activerecord/lib/active_record/fixtures.rb')
-rw-r--r--activerecord/lib/active_record/fixtures.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb
index 1a124aadee..cfc93f46b9 100644
--- a/activerecord/lib/active_record/fixtures.rb
+++ b/activerecord/lib/active_record/fixtures.rb
@@ -5,6 +5,8 @@ require 'active_support/dependencies'
require 'active_record/fixtures/file'
require 'active_record/errors'
+require 'active_support/deprecation' # temporary
+
module ActiveRecord
class FixtureClassNotFound < ActiveRecord::ActiveRecordError #:nodoc:
end
@@ -374,6 +376,7 @@ module ActiveRecord
#--
# An instance of FixtureSet is normally stored in a single YAML file and possibly in a folder with the same name.
#++
+
MAX_ID = 2 ** 30 - 1
@@all_cached_fixtures = Hash.new { |h,k| h[k] = {} }
@@ -651,6 +654,11 @@ module ActiveRecord
end
+ #--
+ # Deprecate 'Fixtures' in favor of 'FixtureSet'.
+ #++
+ Fixtures = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveRecord::Fixtures', '::ActiveRecord::FixtureSet')
+
class Fixture #:nodoc:
include Enumerable