# Using Dry System Auto Register and ActiveSupport::Inflections

**URL:** https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428
**Category:** Support
**Created:** [December 6, 2017, 8:27am UTC](https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428 "2017-12-06T08:27:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![brolycjw](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@brolycjw](https://discourse.dry-rb.org/u/brolycjw)
#### Post date: [December 6, 2017, 8:27am UTC](https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428/1 "2017-12-06T08:27:07Z")

</div>

I’m currently attempting to introduce dry-system to rails, but I am having issues with auto registrar of dry-system with as my classes are inflected with ActiveSupport::Inflections. Is there a way to configure inflections with dry-system auto-register functionality? By the way, this is my current workaround solution in Rails, but using inject will still invoke inflecto and cause issues.

```
class Container < Dry::System::Container
  configure do |config|
    config.root = Rails.root
  end
  load_paths!('lib/components')
end

dir = Rails.root.join('lib/components')
Dir["#{dir}/**/*.rb"].each do |filename|
pathname = Pathname.new(filename)
                   .relative_path_from(dir)
                   .sub_ext('')
                   .to_path
require pathname
Container.register(pathname.tr('/', '.'), pathname.camelize.constantize.new)
```

---

<div class="post-metadata">

### Author: ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)
#### Post date: [January 9, 2018, 7:26pm UTC](https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428/2 "2018-01-09T19:26:54Z")

</div>

Not sure if this is helpful, but we switched to dry-inflector in dry-system 0.9.

---

<div class="post-metadata">

### Author: ![brolycjw](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@brolycjw](https://discourse.dry-rb.org/u/brolycjw)
#### Post date: [January 10, 2018, 3:02am UTC](https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428/3 "2018-01-10T03:02:11Z")

</div>

Thanks for the reply. Unfortunately, I will still need to use a custom loader unless I copy my inflections to Dry::Inflector. A possible approach would be to allow configuration of an inflection backend for Dry::System. Would that be possible?

---

<div class="post-metadata">

### Author: ![solnic](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/solnic/32/779_2.png) [@solnic](https://discourse.dry-rb.org/u/solnic)
#### Post date: [January 19, 2018, 10:40am UTC](https://discourse.dry-rb.org/t/using-dry-system-auto-register-and-activesupport-inflections/428/4 "2018-01-19T10:40:10Z")

</div>

Yes, this will be added prior 1.0.0. We definitely need an inflector that is configurable.
