summaryrefslogtreecommitdiff
path: root/helpers/blog_helpers.rb
blob: 566d4f8fba1d8364f71aced24aa04f64c0449d59 (plain)
1
2
3
4
5
6
7
8
module BlogHelpers

  def article_paragraphs(article)
    html = Nokogiri::HTML(article.body)
    html.xpath("//p").map(&:text)
  end

end