Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lesm/838fe8cd036ce71c84da7f83ce254f42 to your computer and use it in GitHub Desktop.
Save lesm/838fe8cd036ce71c84da7f83ce254f42 to your computer and use it in GitHub Desktop.
= sanitize(text, :tags=>[]).truncate(30, :separator => " ").html_safe
= truncate(strip_tags(post.content), length: 100, omission: '...')
= raw @post.description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment