Refactored generation of unique tags, URIs and object URLs into own classes,

as well as formatting of content
This commit is contained in:
Eugen Rochko 2016-09-09 20:04:34 +02:00
parent 735b4cc62e
commit 3cc47beb6e
28 changed files with 316 additions and 180 deletions

View file

@ -2,7 +2,7 @@
.account-grid-card__header
.avatar= image_tag account.avatar.url(:medium)
.name
= link_to url_for_target(account) do
= link_to TagManager.instance.url_for(account) do
%span.display_name= display_name(account)
%span.username= "@#{account.acct}"
%p.note= truncate(strip_tags(account.note), length: 150)

View file

@ -10,7 +10,7 @@ Nokogiri::XML::Builder.new do |xml|
include_author xml, @account
end
link_alternate xml, url_for_target(@account)
link_alternate xml, TagManager.instance.url_for(@account)
link_self xml, account_url(@account, format: 'atom')
link_hub xml, Rails.configuration.x.hub_url
link_salmon xml, api_salmon_url(@account.id)