Skip to content

Commit ca375e2

Browse files
committed
Remove AS.on_load hook for ActiveRecord adapter
cc #634 This load hook causes the order of ActiveRecord loading to be indeterminte. In a pristine Rails app, AR does not load until after all the initializers are run, which overwrites the configured Flipper adapter in an initializer. This changes make the AR adapter consistent with the others that configure themselves (redis, mongo, etc).
1 parent c975f86 commit ca375e2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/flipper-active_record.rb

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
require 'active_support/lazy_load_hooks'
2-
3-
ActiveSupport.on_load(:active_record) do
4-
require 'flipper/adapters/active_record'
5-
end
1+
require 'flipper/adapters/active_record'

0 commit comments

Comments
 (0)