Przeglądaj źródła

Trap nil object instead of string in title/description cleanup filter #2

master
Adrian Short 12 lat temu
rodzic
commit
50c0b78fa0
1 zmienionych plików z 4 dodań i 0 usunięć
  1. +4
    -0
      app/helpers/posts_helper.rb

+ 4
- 0
app/helpers/posts_helper.rb Wyświetl plik

@@ -33,6 +33,10 @@ module PostsHelper
end
def clean_description(s)
if s.nil?
return ""
end
if s.size > 137
s = s[0..136] + '...'
end


Ładowanie…
Anuluj
Zapisz