Class: Artk::Component

Inherits:
Base
  • Object
show all
Defined in:
app/models/artk/component.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.primary_keyObject



12
13
14
# File 'app/models/artk/component.rb', line 12

def self.primary_key
  "resourceComponentId"
end

.table_nameObject



8
9
10
# File 'app/models/artk/component.rb', line 8

def self.table_name
  "ResourcesComponents"
end

Instance Method Details

#has_child?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'app/models/artk/component.rb', line 16

def has_child?
  self.sub_components.count > 0 ? true : false
end

#pid_and_titleObject



20
21
22
# File 'app/models/artk/component.rb', line 20

def pid_and_title
  { :pid => self.persistentId, :title => self.title }
end