search for: truncate_html

Displaying 3 results from an estimated 3 matches for "truncate_html".

2013 Feb 05
3
Truncate text
...is "TruncateHtml is jus....(continued)" some_html = ''<ul><li><a href="http://whatever">TruncateHtml is just like the vanilla truncate rails helper , TruncateHtml is just like the vanilla truncate rails helper</a></li></ul>'' truncate_html(some_html, :length => 15, :omission => ''...(continued)'') => <ul><li><a href="http://whatever">This...(continued)</a></li></ul> please advice. -- You received this message because you are subscribed to the Google Groups &q...
2009 Mar 02
3
Truncate function and html tags
I have a text field in the db for the body of user posts. Users submit the posts using the tinymce editor, which allows certain html tags. The posts are stored in the db with allowed html tags directly in the post, so I could have something like: <p>This post will try to eliminate the confusion regarding rails and the truncate function.</p> I am trying to display the first 300
2013 Jun 01
10
How about add a method to truncate a long text more smart?
sometimes we need to truncate a long text more smart. eg: The Model layer represents your domain model (such as Account, Product, Person, Post, etc.) and encapsulates the business logic that is specific to your application. In Rails, database-backed model classes are derived from ActiveRecord::Base. Active Record allows you to present the data from database rows as objects and embellish