diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-28 04:53:35 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-28 04:53:35 +0000 |
commit | fb61912798de245f22929808c11d07c612480471 (patch) | |
tree | ca803ee28383e47a07487d0396ca8b996171c344 /activerecord | |
parent | e7cd7e9d954f90737138495f6418bd4fab428931 (diff) | |
download | rails-fb61912798de245f22929808c11d07c612480471.tar.gz rails-fb61912798de245f22929808c11d07c612480471.tar.bz2 rails-fb61912798de245f22929808c11d07c612480471.zip |
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
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/CHANGELOG | 2 | ||||
-rwxr-xr-x | activerecord/lib/active_record/fixtures.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG index a4508c9086..606b910c96 100644 --- a/activerecord/CHANGELOG +++ b/activerecord/CHANGELOG @@ -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>] diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 594e320f6b..3912f86ee6 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -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 @@ class Fixtures < YAML::Omap 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)) |