Skip to content

Instantly share code, notes, and snippets.

@sadjow
Last active December 12, 2015 04:38
Show Gist options
  • Save sadjow/4716099 to your computer and use it in GitHub Desktop.
Save sadjow/4716099 to your computer and use it in GitHub Desktop.
Truncate a text with HTML/HAML
= raw truncate(strip_tags(item.description), :length => 90, :omission => '... ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment