Sha256: 37bea20c5c0a2e243e5fe4f45109fd21e9dceb0f483cd2b836776bd084cafb86

Contents?: true

Size: 637 Bytes

Versions: 16

Compression:

Stored size: 637 Bytes

Contents

atom_feed(:language => I18n.locale.to_s) do |feed|
  feed.title "#{Setting.first.site_name}. #{t('activerecord.models.comments').capitalize}"
  feed.updated @comments.maximum(:updated_at)
  feed.language I18n.locale.to_s

  @comments.each do |comment|
    feed.entry comment, url: page_url(comment.commentable, anchor: "comment-#{comment.id}") do |entry|
      entry.title truncate comment.body, length: 30, separator: ' ...'
      entry.url page_url(comment.commentable, anchor: "comment-#{comment.id}")
      entry.content comment.body
      entry.author do |author|
        author.name comment.author.name
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
tkh_content-0.10.10 app/views/comments/for_feed.atom.builder
tkh_content-0.10.9 app/views/comments/for_feed.atom.builder
tkh_content-0.10.8 app/views/comments/for_feed.atom.builder
tkh_content-0.10.7 app/views/comments/for_feed.atom.builder
tkh_content-0.10.6 app/views/comments/for_feed.atom.builder
tkh_content-0.10.5.1 app/views/comments/for_feed.atom.builder
tkh_content-0.10.5 app/views/comments/for_feed.atom.builder
tkh_content-0.10.4 app/views/comments/for_feed.atom.builder
tkh_content-0.10.3 app/views/comments/for_feed.atom.builder
tkh_content-0.10.2 app/views/comments/for_feed.atom.builder
tkh_content-0.10.1 app/views/comments/for_feed.atom.builder
tkh_content-0.10 app/views/comments/for_feed.atom.builder
tkh_content-0.9.20 app/views/comments/for_feed.atom.builder
tkh_content-0.9.19 app/views/comments/for_feed.atom.builder
tkh_content-0.9.18 app/views/comments/for_feed.atom.builder
tkh_content-0.9.17 app/views/comments/for_feed.atom.builder