Class: Postnhost::Template

Inherits:
ApplicationRecord show all
Includes:
PublicRevisionTouch
Defined in:
app/models/postnhost/template.rb

Constant Summary collapse

DEFAULT_NAME =
"default"
NAMES =
[DEFAULT_NAME, "swiss-editorial", "workspace-journal"].freeze

Class Method Summary collapse

Class Method Details

.active_nameObject



16
17
18
# File 'app/models/postnhost/template.rb', line 16

def self.active_name
  current.name
end

.currentObject



12
13
14
# File 'app/models/postnhost/template.rb', line 12

def self.current
  first_or_create!(name: DEFAULT_NAME)
end