Show wikipage on login screen when present
This commit is contained in:
parent
1447b38bb3
commit
c59ee3a6a7
2 changed files with 11 additions and 0 deletions
|
|
@ -28,6 +28,14 @@ class Page < ActiveRecord::Base
|
|||
permalink == "Home"
|
||||
end
|
||||
|
||||
def public_front_page?
|
||||
permalink == "Public_frontpage"
|
||||
end
|
||||
|
||||
def self.public_front_page
|
||||
where(permalink: "Public_frontpage").first
|
||||
end
|
||||
|
||||
def set_permalink
|
||||
unless title.blank?
|
||||
self.permalink = Page.count == 0 ? "Home" : Page.permalink(title)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue