Skip to content

Commit cef9f95

Browse files
committed
Fix an issue with abstract classes causing filename resolution to choke.
1 parent 6f62d0e commit cef9f95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate/annotate_models.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def find_test_file(dir, file_name)
461461
def resolve_filename(filename_template, model_name, table_name)
462462
return filename_template.
463463
gsub('%MODEL_NAME%', model_name).
464-
gsub('%TABLE_NAME%', table_name)
464+
gsub('%TABLE_NAME%', table_name || model_name.pluralize)
465465
end
466466
end
467467
end

0 commit comments

Comments
 (0)