File tree Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Expand file tree Collapse file tree 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -238,28 +238,6 @@ NOTE: The `ApplicationController` class inside an engine is named just like a
238
238
Rails application in order to make it easier for you to convert your
239
239
applications into engines.
240
240
241
- NOTE: If the parent application runs in `classic` mode, you may run into a
242
- situation where your engine controller is inheriting from the main application
243
- controller and not your engine' s application controller. The best way to prevent
244
- this is to switch to ` zeitwerk` mode in the parent application. Otherwise , use
245
- ` require_dependency` to ensure that the engine' s application controller is
246
- loaded. For example:
247
-
248
- ```ruby
249
- # ONLY NEEDED IN `classic` MODE.
250
- require_dependency "blorgh/application_controller"
251
-
252
- module Blorgh
253
- class ArticlesController < ApplicationController
254
- # ...
255
- end
256
- end
257
- ```
258
-
259
- WARNING: Don' t use ` require` because it will break the automatic reloading of
260
- classes in the development environment - using ` require_dependency` ensures that
261
- classes are loaded and unloaded in the correct manner.
262
-
263
241
Just like for `app/controllers`, you will find a `blorgh` subdirectory under
264
242
the `app/helpers`, `app/jobs`, `app/mailers` and `app/models` directories
265
243
containing the associated `application_*.rb` file for gathering common
You can’t perform that action at this time.
0 commit comments