diff options
author | Rick Olson <technoweenie@gmail.com> | 2006-08-11 23:38:46 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2006-08-11 23:38:46 +0000 |
commit | 02021d89b1928e9869b0038afc08cb6b3e719014 (patch) | |
tree | 350b79527e89bc9d4f38e24d40c8bdca7673fd2f /activerecord/lib | |
parent | 69266a063bfa63408b0ea2453c699b7ad5531d86 (diff) | |
download | rails-02021d89b1928e9869b0038afc08cb6b3e719014.tar.gz rails-02021d89b1928e9869b0038afc08cb6b3e719014.tar.bz2 rails-02021d89b1928e9869b0038afc08cb6b3e719014.zip |
Tweak fixtures so they don't try to use a non-ActiveRecord class. [Kevin Clark]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 9eb3b5792b..5910af75ca 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -395,7 +395,7 @@ class Fixture #:nodoc: klass = @class_name.constantize rescue nil list = @fixture.inject([]) do |fixtures, (key, value)| - col = klass.columns_hash[key] unless klass.nil? + col = klass.columns_hash[key] if klass.kind_of?(ActiveRecord::Base) fixtures << ActiveRecord::Base.connection.quote(value, col).gsub('\\n', "\n").gsub('\\r', "\r") end list * ', ' |