We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 999df68 + 540103c commit 8a45223Copy full SHA for 8a45223
railties/lib/rails/api/task.rb
@@ -160,8 +160,9 @@ def configure_rdoc_files
160
161
# Only generate documentation for files that have been
162
# changed since the API was generated.
163
- if Dir.exist?(api_dir) && !ENV["ALL"]
164
- last_generation = DateTime.rfc2822(File.open("#{api_dir}/created.rid", &:readline))
+ timestamp_path = "#{api_dir}/created.rid"
+ if File.exist?(timestamp_path) && !File.zero?(timestamp_path) && !ENV["ALL"]
165
+ last_generation = DateTime.rfc2822(File.open(timestamp_path, &:readline))
166
167
rdoc_files.keep_if do |file|
168
File.mtime(file).to_datetime > last_generation
0 commit comments