Преглед изворни кода

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

Bernardo Loureiro пре 8 година
родитељ
комит
ee8c6c0dee
1 измењених фајлова са 1 додато и 1 уклоњено
  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]
     BLAZER_IMAGE_EXT = %w[png jpg jpeg gif]
 
 
     def blazer_format_value(key, value)
     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)
         number_with_delimiter(value)
       elsif value =~ BLAZER_URL_REGEX
       elsif value =~ BLAZER_URL_REGEX
         # see if image or link
         # see if image or link