diff options
author | Alexey Muranov <alexey.muranov@gmail.com> | 2012-11-17 14:53:07 +0100 |
---|---|---|
committer | Alexey Muranov <alexey.muranov@gmail.com> | 2012-11-17 15:28:55 +0100 |
commit | 506b9f215f808296a4aac26f57ca298d8d2f1331 (patch) | |
tree | 2ad2f5b9542db5804989eef8a335cbd5cbc2747d /activerecord | |
parent | 02e368413301b9b60a29b9c8d901185e29e479ba (diff) | |
download | rails-506b9f215f808296a4aac26f57ca298d8d2f1331.tar.gz rails-506b9f215f808296a4aac26f57ca298d8d2f1331.tar.bz2 rails-506b9f215f808296a4aac26f57ca298d8d2f1331.zip |
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.
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 : |