ensl.org/app/helpers/articles_helper.rb
Luke Barratt 470372db21 Refactor some article views
Tweak colour brightnesses
2014-05-02 09:27:18 +01:00

12 lines
304 B
Ruby

module ArticlesHelper
def preview_text(article, full)
if article.text_coding == Article::CODING_HTML
content = article.text.html_safe
else
content = article.text_parsed.html_safe
end
content = truncate(raw(strip_tags(content)), length: 200) if !full
content
end
end