Load code after initializing rails engine instances

In application.rb :

config.after_initialize do
  Dir[Rails.root + 'lib/some_extension/**/*.rb'].each do |file|
    require file
  end
end
Licence  CC BY-SA 4.0
Mastodon