Permalink
Browse files

Deprecate "Fixtures" constant

  • Loading branch information...
1 parent a94220b commit d871807a78ca607f5f78e8eaab99e3d46f284c63 @alexeymuranov committed May 12, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 activerecord/lib/active_record/fixtures.rb
@@ -5,6 +5,8 @@
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 @@ class FixtureSet
#--
# 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 @@ def yaml_file_path
end
+ #--
+ # Deprecate 'Fixtures' in favor of 'FixtureSet'.
+ #++
+ Fixtures = ActiveSupport::Deprecation::DeprecatedConstantProxy.new('ActiveRecord::Fixtures', '::ActiveRecord::FixtureSet')
+
class Fixture #:nodoc:
include Enumerable

0 comments on commit d871807

Please sign in to comment.