提交 a5b61269 编写于 作者: A Aaron Patterson

Fixtures class constantizes this value, so no need to do it twice

上级 24166c26
......@@ -788,9 +788,9 @@ class FormatError < FixtureError #:nodoc:
attr_reader :model_class
def initialize(fixture, model_class, connection = ActiveRecord::Base.connection)
@connection = connection
@fixture = fixture
@model_class = model_class.is_a?(Class) ? model_class : model_class.constantize rescue nil
@connection = connection
@fixture = fixture
@model_class = model_class
end
def class_name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册