Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 9051

Show
Ignore:
Timestamp:
03/17/08 22:07:54 (2 months ago)
Author:
david
Message:

Only log if theres a logger

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/lib/active_record/fixtures.rb

    r9050 r9051  
    854854          # Let's warn in case this is a subdependency, otherwise 
    855855          # subdependency error messages are totally cryptic 
    856           ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") 
     856          if ActiveRecord::Base.logger 
     857            ActiveRecord::Base.logger.warn("Unable to load #{file_name}, underlying cause #{e.message} \n\n #{e.backtrace.join("\n")}") 
     858          end 
    857859        end 
    858860