gab-social/app/presenters/instance_presenter.rb

25 lines
422 B
Ruby
Raw Normal View History

2019-07-02 08:10:25 +01:00
# frozen_string_literal: true
class InstancePresenter
delegate(
2021-01-15 20:51:38 +00:00
:site_contact_email,
2019-07-02 08:10:25 +01:00
:site_title,
:site_short_description,
:site_description,
to: Setting
)
def version_number
GabSocial::Version
end
def source_url
GabSocial::Version.source_url
end
2021-01-15 20:51:38 +00:00
def thumbnail
@thumbnail ||= Rails.cache.fetch('site_uploads/thumbnail') { SiteUpload.find_by(var: 'thumbnail') }
end
2019-07-02 08:10:25 +01:00
end