提交 64f106df 编写于 作者: A Alexey Muranov

Use the correct table name from fixture

Fixed a bug in fixtures.rb where the table name was incorrectly inferred from the fixture path which was ambiguously called "table_name" but was also used as the fixture name.
Now, the "correct" table name is taken from an instance variable.
上级 ae8bb118
......@@ -486,8 +486,8 @@ def self.create_fixtures(fixtures_directory, table_names, class_names = {})
# Cap primary key sequences to max(pk).
if connection.respond_to?(:reset_pk_sequence!)
table_names.each do |table_name|
connection.reset_pk_sequence!(table_name.tr('/', '_'))
fixture_files.each do |ff|
connection.reset_pk_sequence!(ff.table_name)
end
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册