about summary refs log tree commit diff
path: root/app/models/extended_description.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/extended_description.rb')
-rw-r--r--app/models/extended_description.rb15
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