# undefined method 'schema' on reload

**URL:** <https://discourse.dry-rb.org/t/undefined-method-schema-on-reload/1490>\
**Category:** Support\
**Created:** [July 24, 2022, 7:35am UTC](https://discourse.dry-rb.org/t/undefined-method-schema-on-reload/1490 "2022-07-24T07:35:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmackay](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.dry-rb.org/pmackay/32/133_2.png) [@pmackay](https://discourse.dry-rb.org/u/pmackay)\
**Post date:** [July 24, 2022, 7:35am UTC](https://discourse.dry-rb.org/t/undefined-method-schema-on-reload/1490/1 "2022-07-24T07:35:59Z")

</div>

I am attempting to integrate [Avo](https://avohq.io/) into a mature Rails app that already uses dry-rails. When a file is edited and the Avo view refreshed, I get this error:

```auto
undefined method 'schema' for FooController:Class

```

FooController is the first controller that uses the `schema` method provided by safe\_params.

Is it possible that the inclusion of the `Dry::Rails::Features::SafeParams` module is not being included during dev reload?

Avo is an Engine that uses Zeitwerk to eager\_load its classes. This seems to be specific to the combination of dry-rails + dry-schema and Avo, but I’m not sure where the root cause is.

---

<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:** [July 26, 2022, 5:31am UTC](https://discourse.dry-rb.org/t/undefined-method-schema-on-reload/1490/2 "2022-07-26T05:31:14Z")

</div>

> Is it possible that the inclusion of the `Dry::Rails::Features::SafeParams` module is not being included during dev reload?

Yes and I suspect this is because reloading of external engines is not handled properly. Please report an issue in dry-rails repo.
