# \[RAILS\] truncate only works local, after deploy it does nothing

**URL:** <https://www.ruby-forum.com/t/rails-truncate-only-works-local-after-deploy-it-does-nothing/192022>\
**Category:** Rails\
**Created:** [July 22, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/rails-truncate-only-works-local-after-deploy-it-does-nothing/192022 "2010-07-22T14:18:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nymo](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/dbc845/32.png) [@nymo](https://www.ruby-forum.com/u/nymo)\
**Post date:** [July 22, 2010, 2:18pm UTC](https://www.ruby-forum.com/t/rails-truncate-only-works-local-after-deploy-it-does-nothing/192022/1 "2010-07-22T14:18:15Z")

</div>

Hi all,

i have strange problem. On my site i have a teaser for an article. This  
teaser is truncated after 200 letters. On my local machine it works  
perfect. After i deploy my application on the serverside, nothing is  
truncated.  
So i looked into the files on the server if the truncate command is set  
and it is. So that’s not the problem.

Here is the my output of the truncate command:

\<%=sanitize(textilize truncate(article.teaser,200))%\>

i tried to change it to something like this:

\<%= truncate(article.teaser,200)%\>

but nothing changed. So it’s not a problem with the XSS plugin.

Has anybody an idea what could be the problem?

Thanks and Greetings

G.P
