diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-17 22:07:54 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-03-17 22:07:54 +0000 |
commit | 75d98db73d053641d24a7356345766b0a7659de0 (patch) | |
tree | f1e332b570c28564b87c1d8be9c2efa48ddf7c3f | |
parent | fbf41c72a930a1b879452d137ba3d75d5ceaf358 (diff) | |
download | rails-75d98db73d053641d24a7356345766b0a7659de0.tar.gz rails-75d98db73d053641d24a7356345766b0a7659de0.tar.bz2 rails-75d98db73d053641d24a7356345766b0a7659de0.zip |
Only log if theres a logger
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9051 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index a68086bf66..0974f8b6bc 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -853,7 +853,9 @@ module Test #:nodoc: # Let's warn in case this is a subdependency, otherwise # subdependency error messages are totally cryptic - ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") + if ActiveRecord::Base.logger + ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") + end end def require_fixture_classes(table_names = nil) |