I have to display a post but i want to display only 3 lines of it......I want to trim the text and put read more link. How do i do that? Thank you. PS: New Bee to rails.
on 2007-05-22 02:46
on 2007-05-22 03:25
check the ruby docs for String. you could use scan or each or index and slice or split so many choices.
on 2007-05-22 20:51
I used split and join...it worked for me. Thank you.
on 2007-05-23 02:21
You might also want to check Rails TextHelper, which has some useful methods like excerpt, truncate, etc for manipulation strings. http://api.rubyonrails.com/classes/ActionView/Help... - H On 5/22/07, raj <firstname.lastname@example.org> wrote: > > I used split and join...it worked for me. > > Thank you. > > -- > Posted via http://www.ruby-forum.com/. > > > > -- Husein Choroomi, CEO, CTO Yucca Intelligence Development http://www.YuccaHQ.com We make the web a better place!