Ver código fonte

Fix to no formatting with delimiter columns named id or starts with id (#74)

Bernardo Loureiro 8 anos atrás
pai
commit
ee8c6c0dee
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      app/helpers/blazer/base_helper.rb

+ 1 - 1
app/helpers/blazer/base_helper.rb

@@ -12,7 +12,7 @@ module Blazer
     BLAZER_IMAGE_EXT = %w[png jpg jpeg gif]
 
     def blazer_format_value(key, value)
-      if value.is_a?(Integer) && !key.to_s.end_with?("id")
+      if value.is_a?(Integer) && !key.to_s.end_with?("id") && !key.to_s.start_with?("id")
         number_with_delimiter(value)
       elsif value =~ BLAZER_URL_REGEX
         # see if image or link