Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

r3801@sedna: jeremy | 2005-10-28 00:42:28 -0700

 Use AR::Base silencing rather than AR::Base.logger silencing in fixtures to preserve Log4r compatibility.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2775 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit fb61912798de245f22929808c11d07c612480471 1 parent e7cd7e9
Jeremy Kemper jeremy authored
2  activerecord/CHANGELOG
View
@@ -1,5 +1,7 @@
*SVN*
+* Use AR::Base.silence rather than AR::Base.logger.silence in fixtures to preserve Log4r compatibility. #2618 [dansketcher@gmail.com]
+
* Constraints are cloned so they can't be inadvertently modified while they're
in effect. Added :readonly finder constraint. Calling an association collection's class method (Part.foobar via item.parts.foobar) constrains :readonly => false since the collection's :joins constraint would otherwise force it to true. [Jeremy Kemper <rails@bitsweat.net>]
4 activerecord/lib/active_record/fixtures.rb
View
@@ -218,7 +218,7 @@ class Fixtures < YAML::Omap
def self.instantiate_fixtures(object, table_name, fixtures, load_instances=true)
object.instance_variable_set "@#{table_name.to_s.gsub('.','_')}", fixtures
if load_instances
- ActiveRecord::Base.logger.silence do
+ ActiveRecord::Base.silence do
fixtures.each do |name, fixture|
if model = fixture.find
object.instance_variable_set "@#{name}", model
@@ -241,7 +241,7 @@ def self.create_fixtures(fixtures_directory, *table_names)
table_names = table_names.flatten.map { |n| n.to_s }
connection = block_given? ? yield : ActiveRecord::Base.connection
- ActiveRecord::Base.logger.silence do
+ ActiveRecord::Base.silence do
fixtures_map = {}
fixtures = table_names.map do |table_name|
fixtures_map[table_name] = Fixtures.new(connection, File.split(table_name.to_s).last, File.join(fixtures_directory, table_name.to_s))
Please sign in to comment.
Something went wrong with that request. Please try again.