diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-10-13 14:42:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 14:42:37 +0200 |
commit | 1bd00036c284bcafb419eaf80347ba49d1b491d9 (patch) | |
tree | 4feb5850a11db2b60a56deb21101251a83247db7 /app/models/extended_description.rb | |
parent | b04633a9614609f18b39ba0f0015df301a04ab64 (diff) |
Change about page to be mounted in the web UI (#19345)
Diffstat (limited to 'app/models/extended_description.rb')
-rw-r--r-- | app/models/extended_description.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/extended_description.rb b/app/models/extended_description.rb new file mode 100644 index 000000000..6e5c0d1b6 --- /dev/null +++ b/app/models/extended_description.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class ExtendedDescription < ActiveModelSerializers::Model + attributes :updated_at, :text + + def self.current + custom = Setting.find_by(var: 'site_extended_description') + + if custom&.value.present? + new(text: custom.value, updated_at: custom.updated_at) + else + new + end + end +end |