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 Shared::IsData

#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar

Methods included from Housekeeping

#has_polymorphic_relationship?

Methods inherited from ApplicationRecord

transaction_with_retry

Instance Attribute Details

#dynamic_content_classString

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, :project_id]

  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

#otu_page_layout_idInteger

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, :project_id]

  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

#positionInteger

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, :project_id]

  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

#project_idInteger

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, :project_id]

  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

#topic_idInteger

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, :project_id]

  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

#typeString

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, :project_id]

  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