mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-11-01 18:59:13 -05:00
- Cap @member.posts in app/views/members/show.rss.haml with .limit(50) - Cap @post.comments in app/views/posts/show.rss.haml with .limit(50) and eager load authors - Remove eager loading of all comments+authors on Post in PostsController#show - Add view specs to verify RSS feed limits Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
23 lines
701 B
Plaintext
23 lines
701 B
Plaintext
<?xml version="1.0" encoding="UTF-8"?>
|
|
%rss{ version: 2.0 }
|
|
%channel
|
|
%title Recent comments on #{@post.subject} (#{ENV['GROWSTUFF_SITE_NAME']})
|
|
%link= post_url(@post)
|
|
- @post.comments.includes(:author).limit(50).each do |comment|
|
|
%item
|
|
%title Comment by #{comment.author.login_name} on #{comment.created_at}
|
|
%description
|
|
|
|
:escaped_markdown
|
|
<p>
|
|
Comment on
|
|
#{ link_to @post.subject, post_url(@post) }
|
|
</p>
|
|
|
|
:escaped_markdown
|
|
#{ strip_tags markdownify(comment.body) }
|
|
|
|
%pubdate= comment.created_at.to_fs(:rfc822)
|
|
%link= post_url(@post)
|
|
%guid= comment_url(comment)
|