Skip to content
This repository
Browse code

Remove deprecated use of ::instantiate_fixtures

  • Loading branch information...
commit 981055540c8a1fc66669cfef29b437083e2fb7d6 1 parent f02e7dc
Alexey Muranov authored May 09, 2012
8  activerecord/lib/active_record/fixtures.rb
@@ -451,8 +451,8 @@ def self.instantiate_fixtures(object, fixture_set, load_instances = true, rails_
451 451
     end
452 452
 
453 453
     def self.instantiate_all_loaded_fixtures(object, load_instances = true)
454  
-      all_loaded_fixtures.each do |table_name, fixtures|
455  
-        ActiveRecord::Fixtures.instantiate_fixtures(object, table_name, fixtures, load_instances)
  454
+      all_loaded_fixtures.each_value do |fixture_set|
  455
+        ActiveRecord::Fixtures.instantiate_fixtures(object, fixture_set, load_instances)
456 456
       end
457 457
     end
458 458
 
@@ -912,8 +912,8 @@ def instantiate_fixtures
912 912
           ActiveRecord::Fixtures.instantiate_all_loaded_fixtures(self, load_instances?)
913 913
         else
914 914
           raise RuntimeError, 'Load fixtures before instantiating them.' if @loaded_fixtures.nil?
915  
-          @loaded_fixtures.each do |fixture_name, fixtures|
916  
-            ActiveRecord::Fixtures.instantiate_fixtures(self, fixture_name, fixtures, load_instances?)
  915
+          @loaded_fixtures.each_value do |fixture_set|
  916
+            ActiveRecord::Fixtures.instantiate_fixtures(self, fixture_set, load_instances?)
917 917
           end
918 918
         end
919 919
       end

0 notes on commit 9810555

Please sign in to comment.
Something went wrong with that request. Please try again.