Class: Landable::Theme

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
HasAssets, Librarian, TableName
Defined in:
app/models/landable/theme.rb

Class Method Summary collapse

Methods included from Librarian

#deactivate, #nuke!, #reactivate

Class Method Details

.create_from_layouts!Object



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

def create_from_layouts!
  return unless table_exists?
  Layout.all.map(&:to_theme)
end

.most_used_on_pagesObject



20
21
22
# File 'app/models/landable/theme.rb', line 20

def most_used_on_pages
  order('pages_count DESC').first
end