You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
658 B

  1. Nokogiri::XML::Builder.new do |xml|
  2. feed(xml) do
  3. simple_id xml, atom_user_stream_url(id: @account.id)
  4. title xml, @account.display_name
  5. subtitle xml, @account.note
  6. updated_at xml, stream_updated_at
  7. author(xml) do
  8. include_author xml, @account
  9. end
  10. link_alternate xml, profile_url(name: @account.username)
  11. link_self xml, atom_user_stream_url(id: @account.id)
  12. link_hub xml, HUB_URL
  13. link_salmon xml, salmon_url(@account)
  14. @account.stream_entries.order('id desc').each do |stream_entry|
  15. entry(xml, false) do
  16. include_entry xml, stream_entry
  17. end
  18. end
  19. end
  20. end.to_xml