From d871807a78ca607f5f78e8eaab99e3d46f284c63 Mon Sep 17 00:00:00 2001 From: Alexey Muranov Date: Sat, 12 May 2012 15:42:54 +0200 Subject: Deprecate "Fixtures" constant --- activerecord/lib/active_record/fixtures.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/lib/active_record/fixtures.rb') 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 -- cgit v1.2.3