gab-social/app/presenters/instance_presenter.rb
2021-01-15 15:51:38 -05:00

25 lines
422 B
Ruby

# frozen_string_literal: true
class InstancePresenter
delegate(
:site_contact_email,
:site_title,
:site_short_description,
:site_description,
to: Setting
)
def version_number
GabSocial::Version
end
def source_url
GabSocial::Version.source_url
end
def thumbnail
@thumbnail ||= Rails.cache.fetch('site_uploads/thumbnail') { SiteUpload.find_by(var: 'thumbnail') }
end
end