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