mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fixtures class constantizes this value, so no need to do it twice
This commit is contained in:
parent
24166c2603
commit
a5b61269f3
1 changed files with 3 additions and 3 deletions
|
@ -788,9 +788,9 @@ class Fixture #: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
|
||||
|
|
Loading…
Reference in a new issue