Skip to content

Commit cb71945

Browse files
authored
Revert to FactoryBot initialization without Rails lifecycle methods (was: Create factories earlier in the lifecycle) (#76)
1 parent 30976ed commit cb71945

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/packs/rails/railtie.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@ module Rails
55
class Railtie < ::Rails::Railtie
66
config.before_configuration do |app|
77
Integrations::Rails.new(app)
8-
8+
Integrations::FactoryBot.new(app)
9+
910
# This is not used within packs-rails. Rather, this allows OTHER tools to
1011
# hook into packs-rails via ActiveSupport hooks.
1112
ActiveSupport.run_load_hooks(:packs_rails, Packs)
1213
end
1314

14-
config.after_initialize do |app|
15-
Integrations::FactoryBot.new(app)
16-
end
1715
end
1816
end
1917
end

0 commit comments

Comments
 (0)