diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-04 14:04:26 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-04 14:04:26 +0200 |
commit | 1022d682dc915bcbf3076c0280f29472068830bb (patch) | |
tree | 6ede8a3c1cb66e175efcd56af347dc2931806284 /app/helpers | |
parent | 7939a216ff5cc7ac6bb30e850a21355f04fdebe5 (diff) |
Normalized data in Redux, fix for asset URLs when rendered outside request
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/atom_builder_helper.rb | 2 | ||||
-rw-r--r-- | app/helpers/routing_helper.rb | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/helpers/atom_builder_helper.rb b/app/helpers/atom_builder_helper.rb index f71f0e83e..a98cb7b3b 100644 --- a/app/helpers/atom_builder_helper.rb +++ b/app/helpers/atom_builder_helper.rb @@ -214,6 +214,6 @@ module AtomBuilderHelper end def single_link_avatar(xml, account, size, px) - xml.link('rel' => 'avatar', 'type' => account.avatar_content_type, 'media:width' => px, 'media:height' =>px, 'href' => asset_url(account.avatar.url(size, false))) + xml.link('rel' => 'avatar', 'type' => account.avatar_content_type, 'media:width' => px, 'media:height' =>px, 'href' => full_asset_url(account.avatar.url(size, false))) end end diff --git a/app/helpers/routing_helper.rb b/app/helpers/routing_helper.rb index cd8132f07..101382604 100644 --- a/app/helpers/routing_helper.rb +++ b/app/helpers/routing_helper.rb @@ -1,11 +1,15 @@ module RoutingHelper extend ActiveSupport::Concern include Rails.application.routes.url_helpers - include ActionView::Helpers::AssetUrlHelper + include ActionView::Helpers::AssetTagHelper included do def default_url_options ActionMailer::Base.default_url_options end end + + def full_asset_url(source) + File.join(root_url, ActionController::Base.helpers.asset_url(source)) + end end |