module Ferret::Browser::ViewHelper
def tick_or_cross(t)
def tick_or_cross(t) "<img src=\"/s/i/#{t ? 'tick' : 'cross'}.png\" alt=\"#{t ? 'yes' : 'no'}\"/>" end
def truncate(str, len = 80)
def truncate(str, len = 80) if str and str.length > len and (add = str[len..-1].index(' ')) str = str[0, len + add] + '…' end str end