Class: Comable::Theme

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/comable/theme.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.dirObject



16
17
18
# File 'app/models/comable/theme.rb', line 16

def dir
  Rails.root.join('themes')
end

Instance Method Details

#default_versionObject



25
26
27
# File 'app/models/comable/theme.rb', line 25

def default_version
  '0.1.0'
end

#dirObject



21
22
23
# File 'app/models/comable/theme.rb', line 21

def dir
  self.class.dir + name
end

#display_nameObject



33
34
35
# File 'app/models/comable/theme.rb', line 33

def display_name
  display.presence || name
end

#to_paramObject



29
30
31
# File 'app/models/comable/theme.rb', line 29

def to_param
  name
end