Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move RoutesLoadedFile into its own file.
This fixes an autoload issue, that happens if RoutesLoadedFile is loaded/accessed before LoadedFile (resulting in uninitialized constant error).
- Loading branch information
1 parent
15ebc37
commit 10b426d
Showing
3 changed files
with
26 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module RailsDevelopmentBoost | ||
class RoutesLoadedFile < LoadedFile | ||
def decorator_like? | ||
false | ||
end | ||
|
||
def changed? | ||
false | ||
end | ||
|
||
def schedule_consts_for_unloading! | ||
Reloader.routes_reloader.force_execute! | ||
end | ||
|
||
def add_constants(new_constants) | ||
end | ||
|
||
def clean_up_if_necessary | ||
end | ||
|
||
def self.for(file_path) | ||
LOADED.loaded?(file_path) ? LOADED[file_path] : LOADED[file_path] = new(file_path) | ||
end | ||
end | ||
end |