Browse Source

Remove duplicate method def `ApplicationHelper#instance_presenter` (#30331)

dariusk-working/4_3_0
Matt Jankowski 2 years ago committed by GitHub
parent
commit
a6d12299f2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      app/helpers/application_helper.rb
  2. 11
      app/helpers/mascot_helper.rb
  3. 1
      app/mailers/user_mailer.rb

4
app/helpers/application_helper.rb

@ -240,6 +240,10 @@ module ApplicationHelper
EmojiFormatter.new(html, custom_emojis, other_options.merge(animate: prefers_autoplay?)).to_s
end
def mascot_url
full_asset_url(instance_presenter.mascot&.file&.url || frontend_asset_path('images/elephant_ui_plane.svg'))
end
def instance_presenter
@instance_presenter ||= InstancePresenter.new
end

11
app/helpers/mascot_helper.rb

@ -1,11 +0,0 @@
# frozen_string_literal: true
module MascotHelper
def mascot_url
full_asset_url(instance_presenter.mascot&.file&.url || frontend_asset_path('images/elephant_ui_plane.svg'))
end
def instance_presenter
@instance_presenter ||= InstancePresenter.new
end
end

1
app/mailers/user_mailer.rb

@ -5,7 +5,6 @@ class UserMailer < Devise::Mailer
helper :accounts
helper :application
helper :mascot
helper :formatting
helper :instance
helper :routing

Loading…
Cancel
Save