mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-02-06 15:41:09 -05:00
* FactoryGirl Changed to FactoryBot file fix changes based on comments received Bundle Update on 2017-10-29 style update to align hash literal added package-lock * indentation fixes with rubocop * name added to contributors
10 lines
304 B
Ruby
10 lines
304 B
Ruby
ActionDispatch::Callbacks.after do
|
|
# Reload the factories
|
|
return unless Rails.env.development? || Rails.env.test?
|
|
|
|
if FactoryBot.factories.present? # first init will load factories, this should only run on subsequent reloads
|
|
FactoryBot.factories.clear
|
|
FactoryBot.find_definitions
|
|
end
|
|
end
|