diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-17 06:38:25 -0800 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-17 06:38:25 -0800 |
commit | ee9412839b8e4f30103519c20001a12582b824b8 (patch) | |
tree | 32f3eef91c2f133eda5845c88d51bfc569a9281c /activerecord/lib/active_record/fixtures.rb | |
parent | f63545c5bab34fcd9323c7d7a5d04e697d8df9a3 (diff) | |
parent | 506b9f215f808296a4aac26f57ca298d8d2f1331 (diff) | |
download | rails-ee9412839b8e4f30103519c20001a12582b824b8.tar.gz rails-ee9412839b8e4f30103519c20001a12582b824b8.tar.bz2 rails-ee9412839b8e4f30103519c20001a12582b824b8.zip |
Merge pull request #8251 from alexeymuranov/deprecate-removed-fixture-methods
Add a deprecation before removing ActiveRecord::Fixtures::find_table_name
Removed in e0ef0936193491689724880599ae26a8f5c2b5a6
Diffstat (limited to 'activerecord/lib/active_record/fixtures.rb')
-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 : |