diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 16:47:15 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-06-13 16:47:15 -0300 |
commit | 41c8cc632af74534a3698b498b1767bb9fe22fe4 (patch) | |
tree | d1f715127a020489ffd4f8aa51827db14259c5f8 /activerecord/lib | |
parent | 4e1da5820a595cc56864ae874a1ebc1c51220a5a (diff) | |
download | rails-41c8cc632af74534a3698b498b1767bb9fe22fe4.tar.gz rails-41c8cc632af74534a3698b498b1767bb9fe22fe4.tar.bz2 rails-41c8cc632af74534a3698b498b1767bb9fe22fe4.zip |
Revert code changes at "Copy edits and code font wrap for Active Record [ci skip]"
This partially reverts commit 1a203d5e07f639332880099fab610b886b1742fc.
Reason: It was committed by accident
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 0d12dd5ddf..4cd5f92207 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -569,7 +569,13 @@ module ActiveRecord @path = path @config = config @model_class = nil - @model_class = class_name + + if class_name.is_a?(Class) # TODO: Should be an AR::Base type class, or any? + @model_class = class_name + else + @model_class = class_name.safe_constantize if class_name + end + @connection = connection @table_name = ( model_class.respond_to?(:table_name) ? |