提交 506b9f21 编写于 作者: A Alexey Muranov

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.
上级 02e36841
......@@ -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.
先完成此消息的编辑!
想要评论请 注册