Skip to content

Commit 258a908

Browse files
committed
Simplify explanation by removing docs for classic mode
Signed-off-by: Takuya Noguchi <[email protected]>
1 parent 9084a90 commit 258a908

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

guides/source/engines.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -238,28 +238,6 @@ NOTE: The `ApplicationController` class inside an engine is named just like a
238238
Rails application in order to make it easier for you to convert your
239239
applications into engines.
240240
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-
263241
Just like for `app/controllers`, you will find a `blorgh` subdirectory under
264242
the `app/helpers`, `app/jobs`, `app/mailers` and `app/models` directories
265243
containing the associated `application_*.rb` file for gathering common

0 commit comments

Comments
 (0)