method

insert_fixtures_set

Importance_0
v6.0.0 - Show latest stable - 0 notes - Class: ActiveRecord::ConnectionAdapters::DatabaseStatements
insert_fixtures_set(fixture_set, tables_to_delete = []) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb, line 359
      def insert_fixtures_set(fixture_set, tables_to_delete = [])
        fixture_inserts = build_fixture_statements(fixture_set)
        table_deletes = tables_to_delete.map { |table| "DELETE FROM #{quote_table_name(table)}" }
        total_sql = Array(combine_multi_statements(table_deletes + fixture_inserts))

        with_multi_statements do
          disable_referential_integrity do
            transaction(requires_new: true) do
              total_sql.each do |sql|
                execute_batch(sql, "Fixtures Load")
              end
            end
          end
        end
      end
Register or log in to add new notes.