Class: Maglev::StaticPage

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model, Translatable
Defined in:
app/models/maglev/static_page.rb

Overview

Mimic the Page model

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Translatable

#translations_for

Instance Attribute Details

#idObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def id
  @id
end

#meta_description_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def meta_description_translations
  @meta_description_translations
end

#og_description_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def og_description_translations
  @og_description_translations
end

#og_image_url_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def og_image_url_translations
  @og_image_url_translations
end

#og_title_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def og_title_translations
  @og_title_translations
end

#path_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def path_translations
  @path_translations
end

#seo_title_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def seo_title_translations
  @seo_title_translations
end

#title_translationsObject

attributes ##



11
12
13
# File 'app/models/maglev/static_page.rb', line 11

def title_translations
  @title_translations
end

Instance Method Details

#lock_versionObject



36
37
38
# File 'app/models/maglev/static_page.rb', line 36

def lock_version
  0
end

#path_hashObject



32
33
34
# File 'app/models/maglev/static_page.rb', line 32

def path_hash
  path_translations
end

#sectionsObject



28
29
30
# File 'app/models/maglev/static_page.rb', line 28

def sections
  []
end

#static?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'app/models/maglev/static_page.rb', line 24

def static?
  true
end

#titleObject

translations ##



16
# File 'app/models/maglev/static_page.rb', line 16

translates :title, :path, :seo_title, :meta_description, :og_title, :og_description, :og_image_url

#visibleObject

methods ##



20
21
22
# File 'app/models/maglev/static_page.rb', line 20

def visible
  true
end