Here is the truncate code I'm using:
<%= truncate(teammember.user.full_name, :length => 8)%>
teammember.user.full_name returns names like: - Steve Jobs - Larry Oracle - James Bond - Dhandar Kentavolv
Butall the truncate is doing is returning: - Steve Jobs... - Larry Oracle... - James Bond... - Dhandar Kentavolv...
The user.full_name is not a field in the DB but a helper in the user model, which might be the issue.?
def full_name
if !fname.nil? && !fname.empty?
[fname, lname].join(" ")
else
['User', id].join(" ")
end
end
Any ideas? thanks!