Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Correctly identify attachments with uppercase extensions

  • Loading branch information...
commit 8e8d1939b646ad6d8fbd44c4247c6a834c733e88 1 parent 7508a49
@tomstuart tomstuart authored
View
2  app/helpers/admin/documents_helper.rb
@@ -41,7 +41,7 @@ def filter_class(options)
}
def humanized_content_type(file_extension)
- FILE_EXTENSION_VS_HUMANIZED_CONTENT_TYPE[file_extension]
+ FILE_EXTENSION_VS_HUMANIZED_CONTENT_TYPE[file_extension.downcase] if file_extension.present?
end
def order_link(document)
View
1  test/unit/helpers/admin/documents_helper_test.rb
@@ -7,6 +7,7 @@ class Admin::DocumentsHelperTest < ActionView::TestCase
test "should return PDF Document for humanized content type" do
assert_equal "PDF Document", humanized_content_type("pdf")
+ assert_equal "PDF Document", humanized_content_type("PDF")
end
test "should return CSV Document for humanized content type" do
Please sign in to comment.
Something went wrong with that request. Please try again.