From 506b9f215f808296a4aac26f57ca298d8d2f1331 Mon Sep 17 00:00:00 2001 From: Alexey Muranov Date: Sat, 17 Nov 2012 14:53:07 +0100 Subject: Add a deprecation before removing find_table_name The `ActiveRecord::Fixtures::find_table_name` method was removed from "master" almost a year ago, but it was never deprecated. Here it comes back, more dead than alive. --- activerecord/lib/active_record/fixtures.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 26ad2087c1..7922bbcfa0 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -381,6 +381,12 @@ module ActiveRecord @@all_cached_fixtures = Hash.new { |h,k| h[k] = {} } + def self.find_table_name(fixture_set_name) # :nodoc: + ActiveSupport::Deprecation.warn( + "ActiveRecord::Fixtures.find_table_name is deprecated and shall be removed from future releases. Use ActiveRecord::Fixtures.default_fixture_model_name instead.") + default_fixture_model_name(fixture_set_name) + end + def self.default_fixture_model_name(fixture_set_name) # :nodoc: ActiveRecord::Base.pluralize_table_names ? fixture_set_name.singularize.camelize : -- cgit v1.2.3