diff options
author | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2014-06-11 00:08:19 +0530 |
---|---|---|
committer | Kuldeep Aggarwal <kd.engineer@yahoo.co.in> | 2014-06-11 00:08:19 +0530 |
commit | 16db90d13ffbb6cd4ad6e128b20ef0f801a2e4a1 (patch) | |
tree | 1773f56bca4c7e84d140ac094d50522566f0e955 /activerecord | |
parent | 6cef56ffac10a3db2b22a45140c5d747e526b6cb (diff) | |
download | rails-16db90d13ffbb6cd4ad6e128b20ef0f801a2e4a1.tar.gz rails-16db90d13ffbb6cd4ad6e128b20ef0f801a2e4a1.tar.bz2 rails-16db90d13ffbb6cd4ad6e128b20ef0f801a2e4a1.zip |
remove deprecation call while initializing `ClassCache` object
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 8 | ||||
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 6 |
2 files changed, 1 insertions, 13 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 6ba667b996..9a1f3f3bb8 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -462,13 +462,7 @@ module ActiveRecord @config = config # Remove string values that aren't constants or subclasses of AR - @class_names.delete_if { |k,klass| - unless klass.is_a? Class - klass = klass.safe_constantize - ActiveSupport::Deprecation.warn("The ability to pass in strings as a class name to `set_fixture_class` will be removed in Rails 4.2. Use the class itself instead.") - end - !insert_class(@class_names, k, klass) - } + @class_names.delete_if { |klass_name, klass| !insert_class(@class_names, klass_name, klass) } end def [](fs_name) diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index 8bbc0af758..042fdaf0bb 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -84,12 +84,6 @@ class FixturesTest < ActiveRecord::TestCase assert fixtures.detect { |f| f.name == 'collections' }, "no fixtures named 'collections' in #{fixtures.map(&:name).inspect}" end - def test_create_symbol_fixtures_is_deprecated - assert_deprecated do - ActiveRecord::FixtureSet.create_fixtures(FIXTURES_ROOT, :collections, :collections => 'Course') { Course.connection } - end - end - def test_attributes topics = create_fixtures("topics").first assert_equal("The First Topic", topics["first"]["title"]) |