diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-11 17:02:53 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-11 17:02:53 -0800 |
commit | a5b61269f3bb08ba270e15c043dc64329f1e10d7 (patch) | |
tree | c772adcbb971eaad0c83169deb6a8d167a06f93d /activerecord | |
parent | 24166c2603d8e706a0f44b05875b32fbf46b48cf (diff) | |
download | rails-a5b61269f3bb08ba270e15c043dc64329f1e10d7.tar.gz rails-a5b61269f3bb08ba270e15c043dc64329f1e10d7.tar.bz2 rails-a5b61269f3bb08ba270e15c043dc64329f1e10d7.zip |
Fixtures class constantizes this value, so no need to do it twice
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 56bfd2aff4..6eeb012aa1 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -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 |