Submission file_by_name: Improve comment

This commit is contained in:
Sebastian Serth
2020-10-27 01:14:13 +01:00
parent c2db083529
commit e8b02b2e0a

View File

@ -55,6 +55,8 @@ class Submission < ApplicationRecord
def file_by_name(file_path)
# expects the full file path incl. file extension
# Caution: There must be no unnecessary path prefix included.
# Use `file.ext` rather than `./file.ext`
collect_files.detect { |file| file.filepath == file_path }
end