Remove duplication in max documents allowed code

This commit is contained in:
Javi Martín
2021-07-11 22:02:07 +02:00
parent a181052f0d
commit 67c29a7c5f
2 changed files with 2 additions and 2 deletions

View File

@@ -23,6 +23,6 @@ class Documents::NestedComponent < ApplicationComponent
end
def max_documents_allowed?
documentable.documents.count >= documentable.class.max_documents_allowed
documentable.documents.count >= max_documents_allowed
end
end