Explorar el Código

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

master
Adrian Short hace 12 años
padre
commit
50c0b78fa0
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. +4
    -0
      app/helpers/posts_helper.rb

+ 4
- 0
app/helpers/posts_helper.rb Ver fichero

@@ -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


Cargando…
Cancelar
Guardar