提交 ee941283 编写于 作者: C Carlos Antonio da Silva

Merge pull request #8251 from alexeymuranov/deprecate-removed-fixture-methods

Add a deprecation before removing ActiveRecord::Fixtures::find_table_name

Removed in e0ef0936
......@@ -381,6 +381,12 @@ class FixtureSet
@@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 :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册