Class: OtuPageLayoutSection

Inherits:
ApplicationRecord show all
Includes:
Housekeeping, Shared::IsData
Defined in:
app/models/otu_page_layout_section.rb

Overview

OtuPageLayoutSection definition…

@todo

Direct Known Subclasses

DynamicSection, StandardSection, TaggedSection

Defined Under Namespace

Classes: DynamicSection, StandardSection, TaggedSection

Instance Attribute Summary (collapse)

Method Summary

Methods included from Housekeeping

#has_polymorphic_relationship?

Instance Attribute Details

- (String) dynamic_content_class

TODO:

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end

- (Integer) otu_page_layout_id

TODO:

Returns:

  • (Integer)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end

- (Integer) position

TODO:

Returns:

  • (Integer)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end

- (Integer) project_id

the project ID

Returns:

  • (Integer)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end

- (Integer) topic_id

TODO:

Returns:

  • (Integer)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end

- (String) type

TODO:

Returns:

  • (String)


28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'app/models/otu_page_layout_section.rb', line 28

class OtuPageLayoutSection < ApplicationRecord
  acts_as_list scope: :otu_page_layout

  include Housekeeping
  include Shared::IsData

  belongs_to :otu_page_layout
  belongs_to :topic, inverse_of: :otu_page_layout_sections

  validates_presence_of :type
  validates_uniqueness_of :topic_id, scope: [:otu_page_layout_id]


#  def self.title
#    'empty' # nil
#  end
#
#  def title
#    self.class.title
#  end
#
#  def self.description
#    nil
#  end
#
#  def self.preview_image
#   'sections/xxx.jpg'
#  end
#
#  def content
#    {partial: '',
#     locals: {local1: 'value'}
#    }
#  end


end