Moving humanized_content_type from DocumentablesHelper to Document model. Removing humanized_file_size in favor of direct use of number_to_human_size form ActionViewHelper. Added additional documentens to all concerned views
This commit is contained in:
@@ -37,12 +37,4 @@ module DocumentablesHelper
|
||||
def max_documents_allowed?(documentable)
|
||||
documentable.documents.count >= documentable.class.max_documents_allowed
|
||||
end
|
||||
|
||||
def documentable_humanized_content_type(documentable_class)
|
||||
documentable_class.attachment_content_type.split("/").last.upcase
|
||||
end
|
||||
|
||||
def documentable_humanized_file_size(documentable_class)
|
||||
number_to_human_size(documentable_class.attachment_file_size)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user