Skip to content

Commit

Permalink
Reset column information for models before running seeds (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuginaJulia committed Jan 25, 2022
1 parent aa8e393 commit 0833adc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# frozen_string_literal: true

# https://github.com/rails/rails/issues/29112
Rails.application.eager_load!
ActiveRecord::Base.descendants.each(&:reset_column_information)

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).

Expand Down

0 comments on commit 0833adc

Please sign in to comment.