Rendering HTML-Content in Atom Feed with Rails atom_feed helper -
i've got problems (fairly undocumented) atom_feed helper.
i'ld love this:
for blogpost in @blogposts feed.entry(blogpost) |entry| entry.title(blogpost.title) entry.content(render :partial => '...', :object => blogpost), :type => 'html') end end but doesn't seem work , have no idea how render html instead of inline text!
let's make example:
entry.content (<div style=" ... "> + article.body + </div> + <div style=" ... "> + <img src=" + article.img.url + ..... ) writing , styling content directly in index.atom.builder annoying.
isn't there way render html-partial in context?
could me.
thanks allot pascalturbo
i did , put findings post, see here: http://www.communityguides.eu/articles/14
a simple version this, there more in link:
app/views/articles/index.atom.builder
atom_feed |feed| feed.title "title" feed.updated @articles.first.created_at @articles.each |article| feed.entry article |entry| entry.title article.titl entry.content article.body, :type => 'html' entry.author |author| author.name article.author end end end end
Comments
Post a Comment