Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- doc = Nokogiri::HTML::DocumentFragment.parse(html_content)
- doc.css("p.pubdate.online").each do |node|
- node.content = self.send("#{article_type}_released_at").strftime("%B %d, %Y")
- end
- doc.to_html
- doc = Nokogiri::HTML(html_content)
- node = doc.at_css("p.pubdate.online")
- node.content = self.send("#{article_type}_released_at").strftime("%B %d, %Y")
- doc.to_html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement