Class: CompoundForm::Content::Base

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/compound_form/content/base.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.deep_cloning_relationsObject



24
25
26
# File 'app/models/compound_form/content/base.rb', line 24

def self.deep_cloning_relations
  self.name.to_relation_name
end

.edit_partial_name(obj) ⇒ Object



40
41
42
# File 'app/models/compound_form/content/base.rb', line 40

def self.edit_partial_name(obj)
  "partials/compound_form/content/base" # Show data only
end

.label_publishedObject



10
11
12
# File 'app/models/compound_form/content/base.rb', line 10

def self.label_published
  includes(:label).references(:labels).merge(Label::Base.published)
end

.partial_name(obj) ⇒ Object



36
37
38
# File 'app/models/compound_form/content/base.rb', line 36

def self.partial_name(obj)
  "partials/compound_form/content/base"
end

.referenced_by(label_class) ⇒ Object



20
21
22
# File 'app/models/compound_form/content/base.rb', line 20

def self.referenced_by(label_class)
  # To something with the label class
end

.target_in_edit_mode(domain_id) ⇒ Object



14
15
16
17
18
# File 'app/models/compound_form/content/base.rb', line 14

def self.target_in_edit_mode(domain_id)
  joins(:compound_form, :label).
  includes(:label).
  where("(compound_forms.domain_id = ?) AND (labels.locked_by IS NOT NULL)", domain_id)
end

.view_section(obj) ⇒ Object



28
29
30
# File 'app/models/compound_form/content/base.rb', line 28

def self.view_section(obj)
  "compound_forms"
end

.view_section_sort_key(obj) ⇒ Object



32
33
34
# File 'app/models/compound_form/content/base.rb', line 32

def self.view_section_sort_key(obj)
  200
end

Instance Method Details

#build_rdf(document, subject) ⇒ Object



44
45
46
# File 'app/models/compound_form/content/base.rb', line 44

def build_rdf(document, subject)
  #
end