Add welcome mail

This commit is contained in:
Patrick Gansterer 2020-03-06 11:46:39 +01:00
parent 75129b52c6
commit 057f3ec8ea
9 changed files with 92 additions and 1 deletions

View file

@ -36,6 +36,10 @@ class Page < ApplicationRecord
where(permalink: "Public_frontpage").first
end
def self.welcome_mail
where(permalink: "Welcome_mail").first
end
def set_permalink
unless title.blank?
self.permalink = Page.count == 0 ? "Home" : Page.permalink(title)