From d499bb031f0d20a5f27facfd57cf4e00f89003d7 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Thu, 11 Feb 2021 10:18:56 +0900 Subject: Use custom mascot on static share page (#15687) * Use custom mascot on static share page * Use full_asset_url --- app/helpers/mascot_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/helpers/mascot_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/mascot_helper.rb b/app/helpers/mascot_helper.rb new file mode 100644 index 000000000..0124c74f1 --- /dev/null +++ b/app/helpers/mascot_helper.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module MascotHelper + def mascot_url + full_asset_url(instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg')) + end + + private + + def instance_presenter + @instance_presenter ||= InstancePresenter.new + end +end -- cgit