HI,
I’m using rails with dry-container and dry-auto-inject.
I get an error :
A copy of MyContainer has been removed from the module tree but is still active!
My container is load from an initializer (/config/initializers/load_container.rb) :
Import = Dry::AutoInject(MyContainer)
And my container look like :
class MyContainer
extend Dry::Container::Mixin
register("api.alias_insert") do
Api::AliasInsert.new
end
end
And I’m using like this in my controllers / classes :
class ConfirmationController < ApplicationController
include Import[alias_insert: “api.alias_insert”]…
Any ideas ?