Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove deprecated use of ::instantiate_fixtures

  • Loading branch information...
commit 981055540c8a1fc66669cfef29b437083e2fb7d6 1 parent f02e7dc
@alexeymuranov alexeymuranov authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/lib/active_record/fixtures.rb
View
8 activerecord/lib/active_record/fixtures.rb
@@ -451,8 +451,8 @@ def self.instantiate_fixtures(object, fixture_set, load_instances = true, rails_
end
def self.instantiate_all_loaded_fixtures(object, load_instances = true)
- all_loaded_fixtures.each do |table_name, fixtures|
- ActiveRecord::Fixtures.instantiate_fixtures(object, table_name, fixtures, load_instances)
+ all_loaded_fixtures.each_value do |fixture_set|
+ ActiveRecord::Fixtures.instantiate_fixtures(object, fixture_set, load_instances)
end
end
@@ -912,8 +912,8 @@ def instantiate_fixtures
ActiveRecord::Fixtures.instantiate_all_loaded_fixtures(self, load_instances?)
else
raise RuntimeError, 'Load fixtures before instantiating them.' if @loaded_fixtures.nil?
- @loaded_fixtures.each do |fixture_name, fixtures|
- ActiveRecord::Fixtures.instantiate_fixtures(self, fixture_name, fixtures, load_instances?)
+ @loaded_fixtures.each_value do |fixture_set|
+ ActiveRecord::Fixtures.instantiate_fixtures(self, fixture_set, load_instances?)
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.