mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-06 00:17:49 -05:00
12 lines
310 B
Ruby
12 lines
310 B
Ruby
# frozen_string_literal: true
|
|
|
|
ActionDispatch::Callbacks.after do
|
|
# Reload the factories
|
|
return unless Rails.env.local?
|
|
|
|
if FactoryBot.factories.present? # first init will load factories, this should only run on subsequent reloads
|
|
FactoryBot.factories.clear
|
|
FactoryBot.find_definitions
|
|
end
|
|
end
|