~cytrogen/masto-fe

ref: 340f1a68becaf7c0f67b0f3a6d101213c8ceff90 masto-fe/app/helpers/mascot_helper.rb -rw-r--r-- 274 bytes
340f1a68 — Matt Jankowski Simplify instance presenter view access (#26046) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
# 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

  def instance_presenter
    @instance_presenter ||= InstancePresenter.new
  end
end