In my app i have article model, and there i have content field, where are stored all my html data of news articles, like image video etc...
but now i need to format rss feed, and i have to fetch all this img tag, and place them to other xml branch.
for example content:
<h1>asdasd</h1>
content...
<img ... />
and my rss builder view now is such:
xml.instruct! :xml, :version => "1.0"#, :encoding => "windows-1251"
xml.rss :version => "2.0" do
xml.channel do
for article in @posts
xml.item do
xml.title article.title
xml.description article.intro_text
end
end
end
maybe use something like gsub, regex? or how it is better to do? please give an advice. Thank you.