Skip to content

Commit

Permalink
Prevent rdoc task from excluding the main page
Browse files Browse the repository at this point in the history
There was a bug where the main page becomes unable to be found
and this change ensures that it does not happen.

Closes rails#50871.
  • Loading branch information
sato11 committed Jan 26, 2024
1 parent 68eade8 commit 51e9074
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions railties/lib/rails/api/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ def configure_sdoc
end

def configure_rdoc_files
rdoc_files.include(api_main)

RDOC_FILES.each do |component, cfg|
cdr = component_root_dir(component)

Expand All @@ -172,6 +170,9 @@ def configure_rdoc_files
# Nothing to do
exit(0) if rdoc_files.empty?
end

# This must come after the mtime comparison to ensure the main page is not excluded.
rdoc_files.include(api_main)
end

# These variables are used by the sdoc template
Expand Down

0 comments on commit 51e9074

Please sign in to comment.