Replies: 2 comments 3 replies
-
According to my research, it also appends concerns again and again 🤔 Check this out here: module TestConcern
include ConvenientService::Support::Concern
end module FirstConfig
def self.included(service_class)
service_class.include ConvenientService::Standard::Config
service_class.concerns do
use TestConcern
end
end
end module SecondConfig
def self.included(service_class)
service_class.include ConvenientService::Standard::Config
service_class.concerns do
use TestConcern
end
end
end class Service
include FirstConfig
include SecondConfig
end Service.concerns.to_a.count
# => 16 class Service
include FirstConfig
include SecondConfig
end Service.concerns.to_a.count
# => 18 class Service
include FirstConfig
include SecondConfig
end Service.concerns.to_a.count
# => 20 |
Beta Was this translation helpful? Give feedback.
3 replies
-
Thanks, @Olha-30. Your improvements are merged as a part of #46. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When the already added config is included multiple times, it appends
middlewares
again and again.Check the following example:
In the future, a lot of the new predefined configs will be created, and some of them may have dependencies on each other.
As a result, some middleware may be added multiple times unintentionally.
Complexity: Medium
Hard Requirements:
include Config
signature inclass Service
must be kept as it is, butmodule Config
can be modified.Beta Was this translation helpful? Give feedback.
All reactions